Index: chrome/test/chromedriver/commands.h |
diff --git a/chrome/test/chromedriver/commands.h b/chrome/test/chromedriver/commands.h |
index 2e624e425959b61da232eb840d5aa72264c339ea..e69764cfa0f8b3255f9b93a16f521ed3d50bcc26 100644 |
--- a/chrome/test/chromedriver/commands.h |
+++ b/chrome/test/chromedriver/commands.h |
@@ -12,7 +12,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "chrome/test/chromedriver/command.h" |
#include "chrome/test/chromedriver/net/sync_websocket_factory.h" |
-#include "chrome/test/chromedriver/session_map.h" |
+#include "chrome/test/chromedriver/session_thread_map.h" |
namespace base { |
class DictionaryValue; |
@@ -21,55 +21,63 @@ class Value; |
class DeviceManager; |
class Log; |
+struct Session; |
class Status; |
class URLRequestContextGetter; |
// Gets status/info about ChromeDriver. |
-Status ExecuteGetStatus( |
+void ExecuteGetStatus( |
const base::DictionaryValue& params, |
const std::string& session_id, |
- scoped_ptr<base::Value>* out_value, |
- std::string* out_session_id); |
+ const CommandCallback& callback); |
struct NewSessionParams { |
NewSessionParams(Log* log, |
- SessionMap* session_map, |
+ SessionThreadMap* session_thread_map, |
scoped_refptr<URLRequestContextGetter> context_getter, |
const SyncWebSocketFactory& socket_factory, |
DeviceManager* device_manager); |
~NewSessionParams(); |
Log* log; |
- SessionMap* session_map; |
+ SessionThreadMap* session_thread_map; |
scoped_refptr<URLRequestContextGetter> context_getter; |
SyncWebSocketFactory socket_factory; |
DeviceManager* device_manager; |
}; |
// Creates a new session. |
-Status ExecuteNewSession( |
+void ExecuteNewSession( |
const NewSessionParams& bound_params, |
const base::DictionaryValue& params, |
const std::string& session_id, |
- scoped_ptr<base::Value>* out_value, |
- std::string* out_session_id); |
+ const CommandCallback& callback); |
-// Quits a particular session. |
-Status ExecuteQuit( |
- bool allow_detach, |
- SessionMap* session_map, |
+// Quits all sessions. |
+void ExecuteQuitAll( |
+ const Command& quit_command, |
+ SessionThreadMap* session_thread_map, |
const base::DictionaryValue& params, |
const std::string& session_id, |
- scoped_ptr<base::Value>* out_value, |
- std::string* out_session_id); |
+ const CommandCallback& callback); |
-// Quits all sessions. |
-Status ExecuteQuitAll( |
- Command quit_command, |
- SessionMap* session_map, |
+typedef base::Callback<Status( |
+ Session* session, |
+ const base::DictionaryValue&, |
+ scoped_ptr<base::Value>*)> SessionCommand; |
+ |
+// Executes a given session command, after acquiring access to the appropriate |
+// session. |
+void ExecuteSessionCommand( |
+ SessionThreadMap* session_thread_map, |
+ const SessionCommand& command, |
+ bool return_ok_without_session, |
const base::DictionaryValue& params, |
const std::string& session_id, |
- scoped_ptr<base::Value>* out_value, |
- std::string* out_session_id); |
+ const CommandCallback& callback); |
+ |
+namespace internal { |
+void CreateSessionOnSessionThreadForTesting(const std::string& id); |
+} // namespace internal |
#endif // CHROME_TEST_CHROMEDRIVER_COMMANDS_H_ |