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
3 // found in the LICENSE file.
5 #ifndef CHROME_TEST_CHROMEDRIVER_COMMANDS_H_
6 #define CHROME_TEST_CHROMEDRIVER_COMMANDS_H_
10 #include "base/callback_forward.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/test/chromedriver/command.h"
14 #include "chrome/test/chromedriver/net/sync_websocket_factory.h"
15 #include "chrome/test/chromedriver/session_map.h"
18 class DictionaryValue
;
23 class URLRequestContextGetter
;
25 // Gets status/info about ChromeDriver.
26 Status
ExecuteGetStatus(
27 const base::DictionaryValue
& params
,
28 const std::string
& session_id
,
29 scoped_ptr
<base::Value
>* out_value
,
30 std::string
* out_session_id
);
32 // Creates a new session.
33 Status
ExecuteNewSession(
34 SessionMap
* session_map
,
35 scoped_refptr
<URLRequestContextGetter
> context_getter
,
36 const SyncWebSocketFactory
& socket_factory
,
37 const base::DictionaryValue
& params
,
38 const std::string
& session_id
,
39 scoped_ptr
<base::Value
>* out_value
,
40 std::string
* out_session_id
);
42 // Quits all sessions.
43 Status
ExecuteQuitAll(
45 SessionMap
* session_map
,
46 const base::DictionaryValue
& params
,
47 const std::string
& session_id
,
48 scoped_ptr
<base::Value
>* out_value
,
49 std::string
* out_session_id
);
51 #endif // CHROME_TEST_CHROMEDRIVER_COMMANDS_H_