OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ |
6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "content/public/browser/browser_main_parts.h" | 10 #include "content/public/browser/browser_main_parts.h" |
11 #include "headless/public/headless_browser.h" | 11 #include "headless/public/headless_browser.h" |
12 | 12 |
13 namespace devtools_http_handler { | |
14 class DevToolsHttpHandler; | |
15 } | |
16 | |
17 namespace headless { | 13 namespace headless { |
18 | 14 |
19 class HeadlessBrowserContextImpl; | 15 class HeadlessBrowserContextImpl; |
20 class HeadlessBrowserImpl; | 16 class HeadlessBrowserImpl; |
21 | 17 |
22 class HeadlessBrowserMainParts : public content::BrowserMainParts { | 18 class HeadlessBrowserMainParts : public content::BrowserMainParts { |
23 public: | 19 public: |
24 explicit HeadlessBrowserMainParts(HeadlessBrowserImpl* browser); | 20 explicit HeadlessBrowserMainParts(HeadlessBrowserImpl* browser); |
25 ~HeadlessBrowserMainParts() override; | 21 ~HeadlessBrowserMainParts() override; |
26 | 22 |
27 // content::BrowserMainParts implementation: | 23 // content::BrowserMainParts implementation: |
28 void PreMainMessageLoopRun() override; | 24 void PreMainMessageLoopRun() override; |
29 void PostMainMessageLoopRun() override; | 25 void PostMainMessageLoopRun() override; |
30 | 26 |
31 private: | 27 private: |
32 HeadlessBrowserImpl* browser_; // Not owned. | 28 HeadlessBrowserImpl* browser_; // Not owned. |
33 std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> | |
34 devtools_http_handler_; | |
35 | 29 |
36 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserMainParts); | 30 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserMainParts); |
37 }; | 31 }; |
38 | 32 |
39 } // namespace headless | 33 } // namespace headless |
40 | 34 |
41 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ | 35 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |