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_APP_SHELL_BROWSER_MAIN_PARTS_H_ | 5 #ifndef APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_ |
6 #define APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_ | 6 #define APPS_SHELL_APP_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" |
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 shell { | |
19 class MinimalShell; | |
20 } | |
21 | |
22 namespace views { | 18 namespace views { |
23 class ViewsDelegate; | 19 class ViewsDelegate; |
24 } | 20 } |
25 | 21 |
| 22 namespace wm { |
| 23 class MinimalShell; |
| 24 } |
| 25 |
26 namespace apps { | 26 namespace apps { |
27 | 27 |
28 // Handles initialization of AppShell. | 28 // Handles initialization of AppShell. |
29 class AppShellBrowserMainParts : public content::BrowserMainParts { | 29 class AppShellBrowserMainParts : public content::BrowserMainParts { |
30 public: | 30 public: |
31 explicit AppShellBrowserMainParts( | 31 explicit AppShellBrowserMainParts( |
32 const content::MainFunctionParams& parameters); | 32 const content::MainFunctionParams& parameters); |
33 virtual ~AppShellBrowserMainParts(); | 33 virtual ~AppShellBrowserMainParts(); |
34 | 34 |
35 // BrowserMainParts overrides. | 35 // BrowserMainParts overrides. |
36 virtual void PreEarlyInitialization() OVERRIDE; | 36 virtual void PreEarlyInitialization() OVERRIDE; |
37 virtual void PreMainMessageLoopStart() OVERRIDE; | 37 virtual void PreMainMessageLoopStart() OVERRIDE; |
38 virtual void PostMainMessageLoopStart() OVERRIDE; | 38 virtual void PostMainMessageLoopStart() OVERRIDE; |
39 virtual void PreMainMessageLoopRun() OVERRIDE; | 39 virtual void PreMainMessageLoopRun() OVERRIDE; |
40 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 40 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
41 virtual void PostMainMessageLoopRun() OVERRIDE; | 41 virtual void PostMainMessageLoopRun() OVERRIDE; |
42 | 42 |
43 content::ShellBrowserContext* browser_context() { | 43 content::ShellBrowserContext* browser_context() { |
44 return browser_context_.get(); | 44 return browser_context_.get(); |
45 } | 45 } |
46 | 46 |
47 private: | 47 private: |
48 scoped_ptr<content::ShellBrowserContext> browser_context_; | 48 scoped_ptr<content::ShellBrowserContext> browser_context_; |
49 | 49 |
50 // Enable a minimal set of views::corewm to be initialized. | 50 // Enable a minimal set of views::corewm to be initialized. |
51 scoped_ptr<shell::MinimalShell> minimal_shell_; | 51 scoped_ptr<wm::MinimalShell> minimal_shell_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(AppShellBrowserMainParts); | 53 DISALLOW_COPY_AND_ASSIGN(AppShellBrowserMainParts); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace apps | 56 } // namespace apps |
57 | 57 |
58 #endif // APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_ | 58 #endif // APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |