OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_NAVIGATION_CONTENT_CLIENT_BROWSER_MAIN_PARTS_H_ | 5 #ifndef SERVICES_NAVIGATION_CONTENT_CLIENT_BROWSER_MAIN_PARTS_H_ |
6 #define SERVICES_NAVIGATION_CONTENT_CLIENT_BROWSER_MAIN_PARTS_H_ | 6 #define SERVICES_NAVIGATION_CONTENT_CLIENT_BROWSER_MAIN_PARTS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/public/browser/browser_main_parts.h" | 11 #include "content/public/browser/browser_main_parts.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class ShellBrowserContext; | 14 class ShellBrowserContext; |
15 struct MainFunctionParams; | 15 struct MainFunctionParams; |
16 } | 16 } |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 class NetLog; | 19 class NetLog; |
20 } | 20 } |
21 | 21 |
22 namespace views { | 22 namespace views { |
23 class ViewsDelegate; | 23 class ViewsDelegate; |
| 24 class WindowManagerConnection; |
24 } | 25 } |
25 | 26 |
26 namespace navigation { | 27 namespace navigation { |
27 | 28 |
28 class Navigation; | 29 class Navigation; |
29 | 30 |
30 class BrowserMainParts : public content::BrowserMainParts { | 31 class BrowserMainParts : public content::BrowserMainParts { |
31 public: | 32 public: |
32 BrowserMainParts(const content::MainFunctionParams& parameters); | 33 BrowserMainParts(const content::MainFunctionParams& parameters); |
33 ~BrowserMainParts() override; | 34 ~BrowserMainParts() override; |
34 | 35 |
35 // Overridden from content::BrowserMainParts: | 36 // Overridden from content::BrowserMainParts: |
36 void ToolkitInitialized() override; | 37 void ToolkitInitialized() override; |
37 void PreMainMessageLoopRun() override; | 38 void PreMainMessageLoopRun() override; |
38 bool MainMessageLoopRun(int* result_code) override; | 39 bool MainMessageLoopRun(int* result_code) override; |
39 void PostMainMessageLoopRun() override; | 40 void PostMainMessageLoopRun() override; |
40 | 41 |
41 content::ShellBrowserContext* browser_context() { | 42 content::ShellBrowserContext* browser_context() { |
42 return browser_context_.get(); | 43 return browser_context_.get(); |
43 } | 44 } |
44 | 45 |
45 void set_navigation(Navigation* navigation) { navigation_ = navigation; } | 46 void set_navigation(Navigation* navigation) { navigation_ = navigation; } |
46 | 47 |
47 private: | 48 private: |
48 std::unique_ptr<net::NetLog> net_log_; | 49 std::unique_ptr<net::NetLog> net_log_; |
49 std::unique_ptr<content::ShellBrowserContext> browser_context_; | 50 std::unique_ptr<content::ShellBrowserContext> browser_context_; |
50 std::unique_ptr<views::ViewsDelegate> views_delegate_; | 51 std::unique_ptr<views::ViewsDelegate> views_delegate_; |
| 52 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; |
51 | 53 |
52 Navigation* navigation_ = nullptr; | 54 Navigation* navigation_ = nullptr; |
53 | 55 |
54 DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); | 56 DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); |
55 }; | 57 }; |
56 | 58 |
57 } // namespace navigation | 59 } // namespace navigation |
58 | 60 |
59 #endif // SERVICES_NAVIGATION_CONTENT_CLIENT_BROWSER_MAIN_PARTS_H_ | 61 #endif // SERVICES_NAVIGATION_CONTENT_CLIENT_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |