Path: blob/trunk/cpp/iedriver/ActionSimulators/ActionSimulator.h
2868 views
// Licensed to the Software Freedom Conservancy (SFC) under one1// or more contributor license agreements. See the NOTICE file2// distributed with this work for additional information3// regarding copyright ownership. The SFC licenses this file4// to you under the Apache License, Version 2.0 (the "License");5// you may not use this file except in compliance with the License.6// You may obtain a copy of the License at7//8// http://www.apache.org/licenses/LICENSE-2.09//10// Unless required by applicable law or agreed to in writing, software11// distributed under the License is distributed on an "AS IS" BASIS,12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13// See the License for the specific language governing permissions and14// limitations under the License.1516#ifndef WEBDRIVER_IE_ACTIONSIMULATOR_H_17#define WEBDRIVER_IE_ACTIONSIMULATOR_H_1819#include <string>20#include <vector>2122#include "../CustomTypes.h"23#include "../InputState.h"2425namespace webdriver {2627struct MouseExtraInfo {28bool offset_specified;29int offset_x;30int offset_y;31std::wstring element_id;32IHTMLElement* element;33};3435struct KeyboardExtraInfo {36std::wstring character;37};3839class ActionSimulator {4041public:42ActionSimulator(void);43virtual ~ActionSimulator();4445virtual bool UseExtraInfo(void) const { return false; }4647virtual int SimulateActions(BrowserHandle browser_wrapper,48std::vector<INPUT> inputs,49InputState* input_state) = 0;50void UpdateInputState(INPUT current_input,51InputState* input_state);5253};5455} // namespace webdriver5657#endif // WEBDRIVER_IE_ACTIONSIMULATOR_H_585960