Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEDRIVER_COMMAND_EXECUTOR_IMPL_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_COMMAND_EXECUTOR_IMPL_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_COMMAND_EXECUTOR_IMPL_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_COMMAND_EXECUTOR_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "chrome/test/chromedriver/chrome_launcher_impl.h" | 15 #include "base/threading/thread.h" |
| 16 #include "chrome/test/chromedriver/command.h" | 16 #include "chrome/test/chromedriver/command.h" |
| 17 #include "chrome/test/chromedriver/command_executor.h" | 17 #include "chrome/test/chromedriver/command_executor.h" |
| 18 #include "chrome/test/chromedriver/session_map.h" | 18 #include "chrome/test/chromedriver/session_map.h" |
| 19 #include "chrome/test/chromedriver/status.h" | 19 #include "chrome/test/chromedriver/status.h" |
| 20 #include "chrome/test/chromedriver/synchronized_map.h" | 20 #include "chrome/test/chromedriver/synchronized_map.h" |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 class DictionaryValue; | 23 class DictionaryValue; |
| 24 class Value; | 24 class Value; |
| 25 } | 25 } |
| 26 | 26 |
| 27 class ChromeLauncherImpl; | |
| 28 class URLRequestContextGetter; | |
| 29 | |
| 27 class CommandExecutorImpl : public CommandExecutor { | 30 class CommandExecutorImpl : public CommandExecutor { |
| 28 public: | 31 public: |
| 29 CommandExecutorImpl(); | 32 CommandExecutorImpl(); |
| 30 virtual ~CommandExecutorImpl(); | 33 virtual ~CommandExecutorImpl(); |
| 31 | 34 |
| 35 virtual void Init() OVERRIDE; | |
|
chrisgao (Use stgao instead)
2012/12/01 08:37:19
Also overridden.
Move to after comment "// Overrid
kkania
2013/02/28 21:51:58
Done.
| |
| 36 | |
| 32 // Overridden from CommandExecutor: | 37 // Overridden from CommandExecutor: |
| 33 virtual void ExecuteCommand(const std::string& name, | 38 virtual void ExecuteCommand(const std::string& name, |
| 34 const base::DictionaryValue& params, | 39 const base::DictionaryValue& params, |
| 35 const std::string& session_id, | 40 const std::string& session_id, |
| 36 StatusCode* status_code, | 41 StatusCode* status_code, |
| 37 scoped_ptr<base::Value>* value, | 42 scoped_ptr<base::Value>* value, |
| 38 std::string* out_session_id) OVERRIDE; | 43 std::string* out_session_id) OVERRIDE; |
| 39 | 44 |
| 40 private: | 45 private: |
| 41 FRIEND_TEST_ALL_PREFIXES(CommandExecutorImplTest, SimpleCommand); | 46 FRIEND_TEST_ALL_PREFIXES(CommandExecutorImplTest, SimpleCommand); |
| 42 FRIEND_TEST_ALL_PREFIXES( | 47 FRIEND_TEST_ALL_PREFIXES( |
| 43 CommandExecutorImplTest, CommandThatDoesntSetValueOrSessionId); | 48 CommandExecutorImplTest, CommandThatDoesntSetValueOrSessionId); |
| 44 FRIEND_TEST_ALL_PREFIXES(CommandExecutorImplTest, CommandThatReturnsError); | 49 FRIEND_TEST_ALL_PREFIXES(CommandExecutorImplTest, CommandThatReturnsError); |
| 45 | 50 |
| 51 base::Thread io_thread_; | |
| 52 scoped_refptr<URLRequestContextGetter> context_getter_; | |
| 46 SessionMap session_map_; | 53 SessionMap session_map_; |
| 47 ChromeLauncherImpl launcher_; | 54 scoped_ptr<ChromeLauncherImpl> launcher_; |
| 48 SynchronizedMap<std::string, Command> command_map_; | 55 SynchronizedMap<std::string, Command> command_map_; |
| 49 | 56 |
| 50 DISALLOW_COPY_AND_ASSIGN(CommandExecutorImpl); | 57 DISALLOW_COPY_AND_ASSIGN(CommandExecutorImpl); |
| 51 }; | 58 }; |
| 52 | 59 |
| 53 #endif // CHROME_TEST_CHROMEDRIVER_COMMAND_EXECUTOR_IMPL_H_ | 60 #endif // CHROME_TEST_CHROMEDRIVER_COMMAND_EXECUTOR_IMPL_H_ |
| OLD | NEW |