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_CHROME_IMPL_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_IMPL_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_IMPL_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_IMPL_H_ |
7 | 7 |
| 8 #include <list> |
| 9 #include <string> |
| 10 |
8 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
9 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" |
10 #include "base/process.h" | 15 #include "base/process.h" |
11 #include "chrome/test/chromedriver/chrome.h" | 16 #include "chrome/test/chromedriver/chrome.h" |
12 | 17 |
| 18 class DevToolsClient; |
13 class Status; | 19 class Status; |
| 20 class URLRequestContextGetter; |
14 | 21 |
15 class ChromeImpl : public Chrome { | 22 class ChromeImpl : public Chrome { |
16 public: | 23 public: |
17 ChromeImpl(base::ProcessHandle process, base::ScopedTempDir* user_data_dir); | 24 ChromeImpl(base::ProcessHandle process, |
| 25 URLRequestContextGetter* context_getter, |
| 26 base::ScopedTempDir* user_data_dir, |
| 27 int port); |
18 virtual ~ChromeImpl(); | 28 virtual ~ChromeImpl(); |
19 | 29 |
| 30 Status Init(); |
| 31 |
20 // Overridden from Chrome: | 32 // Overridden from Chrome: |
| 33 virtual Status Load(const std::string& url) OVERRIDE; |
21 virtual Status Quit() OVERRIDE; | 34 virtual Status Quit() OVERRIDE; |
22 | 35 |
23 private: | 36 private: |
24 base::ProcessHandle process_; | 37 base::ProcessHandle process_; |
| 38 scoped_refptr<URLRequestContextGetter> context_getter_; |
25 base::ScopedTempDir user_data_dir_; | 39 base::ScopedTempDir user_data_dir_; |
| 40 int port_; |
| 41 scoped_ptr<DevToolsClient> client_; |
26 }; | 42 }; |
27 | 43 |
| 44 namespace internal { |
| 45 |
| 46 Status ParsePagesInfo(const std::string& data, |
| 47 std::list<std::string>* debugger_urls); |
| 48 |
| 49 } // namespace internal |
| 50 |
28 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_IMPL_H_ | 51 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_IMPL_H_ |
OLD | NEW |