| OLD | NEW | 
|---|
|  | (Empty) | 
| 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 |  | 
| 3 // found in the LICENSE file. |  | 
| 4 |  | 
| 5 #ifndef APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |  | 
| 6 #define APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |  | 
| 7 |  | 
| 8 #include "base/basictypes.h" |  | 
| 9 #include "base/compiler_specific.h" |  | 
| 10 #include "base/memory/scoped_ptr.h" |  | 
| 11 #include "content/public/browser/browser_main_parts.h" |  | 
| 12 #include "content/public/common/main_function_params.h" |  | 
| 13 #include "ui/aura/window_tree_host_observer.h" |  | 
| 14 |  | 
| 15 namespace content { |  | 
| 16 class ShellDevToolsDelegate; |  | 
| 17 struct MainFunctionParams; |  | 
| 18 } |  | 
| 19 |  | 
| 20 namespace extensions { |  | 
| 21 class ShellExtensionsBrowserClient; |  | 
| 22 class ShellExtensionSystem; |  | 
| 23 class ShellOmahaQueryParamsDelegate; |  | 
| 24 } |  | 
| 25 |  | 
| 26 namespace views { |  | 
| 27 class Widget; |  | 
| 28 } |  | 
| 29 |  | 
| 30 namespace net { |  | 
| 31 class NetLog; |  | 
| 32 } |  | 
| 33 |  | 
| 34 namespace apps { |  | 
| 35 |  | 
| 36 class ShellBrowserContext; |  | 
| 37 class ShellBrowserMainDelegate; |  | 
| 38 class ShellDesktopController; |  | 
| 39 class ShellExtensionsClient; |  | 
| 40 |  | 
| 41 #if defined(OS_CHROMEOS) |  | 
| 42 class ShellNetworkController; |  | 
| 43 #endif |  | 
| 44 |  | 
| 45 // Handles initialization of AppShell. |  | 
| 46 class ShellBrowserMainParts : public content::BrowserMainParts { |  | 
| 47  public: |  | 
| 48   ShellBrowserMainParts(const content::MainFunctionParams& parameters, |  | 
| 49                         ShellBrowserMainDelegate* browser_main_delegate); |  | 
| 50   virtual ~ShellBrowserMainParts(); |  | 
| 51 |  | 
| 52   ShellBrowserContext* browser_context() { |  | 
| 53     return browser_context_.get(); |  | 
| 54   } |  | 
| 55 |  | 
| 56   extensions::ShellExtensionSystem* extension_system() { |  | 
| 57     return extension_system_; |  | 
| 58   } |  | 
| 59 |  | 
| 60   // BrowserMainParts overrides. |  | 
| 61   virtual void PreEarlyInitialization() OVERRIDE; |  | 
| 62   virtual void PreMainMessageLoopStart() OVERRIDE; |  | 
| 63   virtual void PostMainMessageLoopStart() OVERRIDE; |  | 
| 64   virtual int PreCreateThreads() OVERRIDE; |  | 
| 65   virtual void PreMainMessageLoopRun() OVERRIDE; |  | 
| 66   virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |  | 
| 67   virtual void PostMainMessageLoopRun() OVERRIDE; |  | 
| 68   virtual void PostDestroyThreads() OVERRIDE; |  | 
| 69 |  | 
| 70  private: |  | 
| 71   // Creates and initializes the ExtensionSystem. |  | 
| 72   void CreateExtensionSystem(); |  | 
| 73 |  | 
| 74 #if defined(OS_CHROMEOS) |  | 
| 75   scoped_ptr<ShellNetworkController> network_controller_; |  | 
| 76 #endif |  | 
| 77   scoped_ptr<ShellDesktopController> desktop_controller_; |  | 
| 78   scoped_ptr<ShellBrowserContext> browser_context_; |  | 
| 79   scoped_ptr<ShellExtensionsClient> extensions_client_; |  | 
| 80   scoped_ptr<extensions::ShellExtensionsBrowserClient> |  | 
| 81       extensions_browser_client_; |  | 
| 82   scoped_ptr<net::NetLog> net_log_; |  | 
| 83   scoped_ptr<content::ShellDevToolsDelegate> devtools_delegate_; |  | 
| 84   scoped_ptr<extensions::ShellOmahaQueryParamsDelegate> |  | 
| 85       omaha_query_params_delegate_; |  | 
| 86 |  | 
| 87   // Owned by the KeyedService system. |  | 
| 88   extensions::ShellExtensionSystem* extension_system_; |  | 
| 89 |  | 
| 90   // For running app browsertests. |  | 
| 91   const content::MainFunctionParams parameters_; |  | 
| 92 |  | 
| 93   // If true, indicates the main message loop should be run |  | 
| 94   // in MainMessageLoopRun. If false, it has already been run. |  | 
| 95   bool run_message_loop_; |  | 
| 96 |  | 
| 97   scoped_ptr<ShellBrowserMainDelegate> browser_main_delegate_; |  | 
| 98 |  | 
| 99   DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); |  | 
| 100 }; |  | 
| 101 |  | 
| 102 }  // namespace apps |  | 
| 103 |  | 
| 104 #endif  // APPS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |  | 
| OLD | NEW | 
|---|