| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMAND_H_ | |
| 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMAND_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "chrome/test/webdriver/commands/webdriver_command.h" | |
| 12 | |
| 13 namespace webdriver { | |
| 14 | |
| 15 // Handles commands that interact with a web element in the WebDriver REST | |
| 16 // service. | |
| 17 class WebElementCommand : public WebDriverCommand { | |
| 18 public: | |
| 19 inline WebElementCommand(const std::vector<std::string>& path_segments, | |
| 20 const DictionaryValue* const parameters) | |
| 21 : WebDriverCommand(path_segments, parameters), | |
| 22 path_segments_(path_segments) {} | |
| 23 virtual ~WebElementCommand() {} | |
| 24 | |
| 25 virtual bool Init(Response* const response); | |
| 26 | |
| 27 protected: | |
| 28 bool GetElementLocation(bool in_view, int* x, int* y); | |
| 29 bool GetElementSize(int* width, int* height); | |
| 30 | |
| 31 const std::vector<std::string>& path_segments_; | |
| 32 std::string element_id; | |
| 33 | |
| 34 private: | |
| 35 virtual bool RequiresValidTab() { return true; } | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(WebElementCommand); | |
| 38 }; | |
| 39 | |
| 40 } // namespace webdriver | |
| 41 | |
| 42 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMAND_H_ | |
| OLD | NEW |