OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ | 5 #ifndef APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |
6 #define APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ | 6 #define APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 class ShellBrowserContext; | 36 class ShellBrowserContext; |
37 class ShellBrowserMainDelegate; | 37 class ShellBrowserMainDelegate; |
38 class ShellDesktopController; | 38 class ShellDesktopController; |
39 class ShellExtensionsClient; | 39 class ShellExtensionsClient; |
40 | 40 |
41 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
42 class ShellNetworkController; | 42 class ShellNetworkController; |
43 #endif | 43 #endif |
44 | 44 |
45 // Handles initialization of AppShell. | 45 // Handles initialization of AppShell. |
46 class ShellBrowserMainParts : public content::BrowserMainParts, | 46 class ShellBrowserMainParts : public content::BrowserMainParts { |
47 public aura::WindowTreeHostObserver { | |
48 public: | 47 public: |
49 ShellBrowserMainParts(const content::MainFunctionParams& parameters, | 48 ShellBrowserMainParts(const content::MainFunctionParams& parameters, |
50 ShellBrowserMainDelegate* browser_main_delegate); | 49 ShellBrowserMainDelegate* browser_main_delegate); |
51 virtual ~ShellBrowserMainParts(); | 50 virtual ~ShellBrowserMainParts(); |
52 | 51 |
53 ShellBrowserContext* browser_context() { | 52 ShellBrowserContext* browser_context() { |
54 return browser_context_.get(); | 53 return browser_context_.get(); |
55 } | 54 } |
56 | 55 |
57 extensions::ShellExtensionSystem* extension_system() { | 56 extensions::ShellExtensionSystem* extension_system() { |
58 return extension_system_; | 57 return extension_system_; |
59 } | 58 } |
60 | 59 |
61 // BrowserMainParts overrides. | 60 // BrowserMainParts overrides. |
62 virtual void PreEarlyInitialization() OVERRIDE; | 61 virtual void PreEarlyInitialization() OVERRIDE; |
63 virtual void PreMainMessageLoopStart() OVERRIDE; | 62 virtual void PreMainMessageLoopStart() OVERRIDE; |
64 virtual void PostMainMessageLoopStart() OVERRIDE; | 63 virtual void PostMainMessageLoopStart() OVERRIDE; |
65 virtual int PreCreateThreads() OVERRIDE; | 64 virtual int PreCreateThreads() OVERRIDE; |
66 virtual void PreMainMessageLoopRun() OVERRIDE; | 65 virtual void PreMainMessageLoopRun() OVERRIDE; |
67 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 66 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
68 virtual void PostMainMessageLoopRun() OVERRIDE; | 67 virtual void PostMainMessageLoopRun() OVERRIDE; |
69 virtual void PostDestroyThreads() OVERRIDE; | 68 virtual void PostDestroyThreads() OVERRIDE; |
70 | 69 |
71 // aura::WindowTreeHostObserver overrides: | |
72 virtual void OnHostCloseRequested(const aura::WindowTreeHost* host) OVERRIDE; | |
73 | |
74 private: | 70 private: |
75 // Creates and initializes the ExtensionSystem. | 71 // Creates and initializes the ExtensionSystem. |
76 void CreateExtensionSystem(); | 72 void CreateExtensionSystem(); |
77 | 73 |
78 #if defined(OS_CHROMEOS) | 74 #if defined(OS_CHROMEOS) |
79 scoped_ptr<ShellNetworkController> network_controller_; | 75 scoped_ptr<ShellNetworkController> network_controller_; |
80 #endif | 76 #endif |
81 scoped_ptr<ShellDesktopController> desktop_controller_; | 77 scoped_ptr<ShellDesktopController> desktop_controller_; |
82 scoped_ptr<ShellBrowserContext> browser_context_; | 78 scoped_ptr<ShellBrowserContext> browser_context_; |
83 scoped_ptr<ShellExtensionsClient> extensions_client_; | 79 scoped_ptr<ShellExtensionsClient> extensions_client_; |
(...skipping 14 matching lines...) Expand all Loading... |
98 bool run_message_loop_; | 94 bool run_message_loop_; |
99 | 95 |
100 scoped_ptr<ShellBrowserMainDelegate> browser_main_delegate_; | 96 scoped_ptr<ShellBrowserMainDelegate> browser_main_delegate_; |
101 | 97 |
102 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); | 98 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); |
103 }; | 99 }; |
104 | 100 |
105 } // namespace apps | 101 } // namespace apps |
106 | 102 |
107 #endif // APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ | 103 #endif // APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |