| 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_COMMANDS_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_COMMANDS_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_COMMANDS_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_COMMANDS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/test/chromedriver/command.h" | 13 #include "chrome/test/chromedriver/command.h" |
| 14 #include "chrome/test/chromedriver/net/sync_websocket_factory.h" | 14 #include "chrome/test/chromedriver/net/sync_websocket_factory.h" |
| 15 #include "chrome/test/chromedriver/session_thread_map.h" | 15 #include "chrome/test/chromedriver/session_thread_map.h" |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 class DictionaryValue; | 18 class DictionaryValue; |
| 19 class Value; | 19 class Value; |
| 20 } | 20 } |
| 21 | 21 |
| 22 class DeviceManager; | 22 class DeviceManager; |
| 23 class Log; | |
| 24 struct Session; | 23 struct Session; |
| 25 class Status; | 24 class Status; |
| 26 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
| 27 | 26 |
| 28 // Gets status/info about ChromeDriver. | 27 // Gets status/info about ChromeDriver. |
| 29 void ExecuteGetStatus( | 28 void ExecuteGetStatus( |
| 30 const base::DictionaryValue& params, | 29 const base::DictionaryValue& params, |
| 31 const std::string& session_id, | 30 const std::string& session_id, |
| 32 const CommandCallback& callback); | 31 const CommandCallback& callback); |
| 33 | 32 |
| 34 struct NewSessionParams { | 33 struct NewSessionParams { |
| 35 NewSessionParams(Log* log, | 34 NewSessionParams(SessionThreadMap* session_thread_map, |
| 36 SessionThreadMap* session_thread_map, | |
| 37 scoped_refptr<URLRequestContextGetter> context_getter, | 35 scoped_refptr<URLRequestContextGetter> context_getter, |
| 38 const SyncWebSocketFactory& socket_factory, | 36 const SyncWebSocketFactory& socket_factory, |
| 39 DeviceManager* device_manager); | 37 DeviceManager* device_manager); |
| 40 ~NewSessionParams(); | 38 ~NewSessionParams(); |
| 41 | 39 |
| 42 Log* log; | |
| 43 SessionThreadMap* session_thread_map; | 40 SessionThreadMap* session_thread_map; |
| 44 scoped_refptr<URLRequestContextGetter> context_getter; | 41 scoped_refptr<URLRequestContextGetter> context_getter; |
| 45 SyncWebSocketFactory socket_factory; | 42 SyncWebSocketFactory socket_factory; |
| 46 DeviceManager* device_manager; | 43 DeviceManager* device_manager; |
| 47 }; | 44 }; |
| 48 | 45 |
| 49 // Creates a new session. | 46 // Creates a new session. |
| 50 void ExecuteNewSession( | 47 void ExecuteNewSession( |
| 51 const NewSessionParams& bound_params, | 48 const NewSessionParams& bound_params, |
| 52 const base::DictionaryValue& params, | 49 const base::DictionaryValue& params, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 74 bool return_ok_without_session, | 71 bool return_ok_without_session, |
| 75 const base::DictionaryValue& params, | 72 const base::DictionaryValue& params, |
| 76 const std::string& session_id, | 73 const std::string& session_id, |
| 77 const CommandCallback& callback); | 74 const CommandCallback& callback); |
| 78 | 75 |
| 79 namespace internal { | 76 namespace internal { |
| 80 void CreateSessionOnSessionThreadForTesting(const std::string& id); | 77 void CreateSessionOnSessionThreadForTesting(const std::string& id); |
| 81 } // namespace internal | 78 } // namespace internal |
| 82 | 79 |
| 83 #endif // CHROME_TEST_CHROMEDRIVER_COMMANDS_H_ | 80 #endif // CHROME_TEST_CHROMEDRIVER_COMMANDS_H_ |
| OLD | NEW |