| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_WEBDRIVER_COMMAND_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_WEBDRIVER_COMMAND_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_WEBDRIVER_COMMAND_H_ | 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_WEBDRIVER_COMMAND_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "chrome/test/webdriver/commands/command.h" | 11 #include "chrome/test/webdriver/commands/command.h" |
| 12 #include "chrome/test/webdriver/session.h" | 12 #include "chrome/test/webdriver/session.h" |
| 13 | 13 |
| 14 class DictionaryValue; | 14 class DictionaryValue; |
| 15 | 15 |
| 16 namespace webdriver { | 16 namespace webdriver { |
| 17 | 17 |
| 18 class Response; | 18 class Response; |
| 19 | 19 |
| 20 // All URLs that are found in the document: | 20 // All URLs that are found in the document: |
| 21 // http://code.google.com/p/selenium/wiki/JsonWireProtocol | 21 // http://code.google.com/p/selenium/wiki/JsonWireProtocol |
| 22 // and are to be supported for all browsers and platforms should inhert | 22 // and are to be supported for all browsers and platforms should inhert |
| 23 // this class. For cases which do not invlove interaction with the | 23 // this class. For cases which do not invlove interaction with the |
| 24 // browser, such a transfering a file, inhert from the Command class | 24 // browser, such a transfering a file, inhert from the Command class |
| 25 // directly. | 25 // directly. |
| 26 class WebDriverCommand : public Command { | 26 class WebDriverCommand : public Command { |
| 27 public: | 27 public: |
| 28 inline WebDriverCommand(const std::vector<std::string> path_segments, | 28 WebDriverCommand(const std::vector<std::string> path_segments, |
| 29 const DictionaryValue* const parameters) | 29 const DictionaryValue* const parameters) |
| 30 : Command(path_segments, parameters), session_(NULL) {} | 30 : Command(path_segments, parameters), session_(NULL) {} |
| 31 virtual ~WebDriverCommand() {} | 31 virtual ~WebDriverCommand() {} |
| 32 | 32 |
| 33 // Initializes this webdriver command by fetching the command session. | 33 // Initializes this webdriver command by fetching the command session. |
| 34 virtual bool Init(Response* const response); | 34 virtual bool Init(Response* const response); |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 Session* session_; | 37 Session* session_; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(WebDriverCommand); | 39 DISALLOW_COPY_AND_ASSIGN(WebDriverCommand); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace webdriver | 42 } // namespace webdriver |
| 43 | 43 |
| 44 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_WEBDRIVER_COMMAND_H_ | 44 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_WEBDRIVER_COMMAND_H_ |
| OLD | NEW |