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 headless { | 13 namespace headless { |
14 | 14 |
15 class HeadlessBrowserContextImpl; | |
16 class HeadlessBrowserImpl; | 15 class HeadlessBrowserImpl; |
17 | 16 |
18 class HeadlessBrowserMainParts : public content::BrowserMainParts { | 17 class HeadlessBrowserMainParts : public content::BrowserMainParts { |
19 public: | 18 public: |
20 explicit HeadlessBrowserMainParts(HeadlessBrowserImpl* browser); | 19 explicit HeadlessBrowserMainParts(HeadlessBrowserImpl* browser); |
21 ~HeadlessBrowserMainParts() override; | 20 ~HeadlessBrowserMainParts() override; |
22 | 21 |
23 // content::BrowserMainParts implementation: | 22 // content::BrowserMainParts implementation: |
24 void PreMainMessageLoopRun() override; | 23 void PreMainMessageLoopRun() override; |
25 void PostMainMessageLoopRun() override; | 24 void PostMainMessageLoopRun() override; |
26 | 25 |
27 private: | 26 private: |
28 HeadlessBrowserImpl* browser_; // Not owned. | 27 HeadlessBrowserImpl* browser_; // Not owned. |
29 | 28 |
30 bool devtools_http_handler_started_; | 29 bool devtools_http_handler_started_; |
31 | 30 |
32 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserMainParts); | 31 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserMainParts); |
33 }; | 32 }; |
34 | 33 |
35 } // namespace headless | 34 } // namespace headless |
36 | 35 |
37 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ | 36 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |