Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Side by Side Diff: apps/shell/shell_browser_main_parts.h

Issue 151893002: Reorganize apps/shell into app, browser and common directories (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (subdirs) Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « apps/shell/shell_browser_context.cc ('k') | apps/shell/shell_browser_main_parts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_SHELL_BROWSER_MAIN_PARTS_H_
6 #define APPS_SHELL_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 "ui/aura/root_window_observer.h"
13
14 namespace aura {
15 class TestScreen;
16 }
17
18 namespace content {
19 class ShellBrowserContext;
20 struct MainFunctionParams;
21 }
22
23 namespace extensions {
24 class ShellExtensionsBrowserClient;
25 class ShellExtensionSystem;
26 }
27
28 namespace wm {
29 class WMTestHelper;
30 }
31
32 namespace apps {
33
34 class ShellBrowserContext;
35 class ShellExtensionsClient;
36
37 // Handles initialization of AppShell.
38 class ShellBrowserMainParts : public content::BrowserMainParts,
39 public aura::RootWindowObserver {
40 public:
41 explicit ShellBrowserMainParts(
42 const content::MainFunctionParams& parameters);
43 virtual ~ShellBrowserMainParts();
44
45 ShellBrowserContext* browser_context() {
46 return browser_context_.get();
47 }
48
49 extensions::ShellExtensionSystem* extension_system() {
50 return extension_system_;
51 }
52
53 // BrowserMainParts overrides.
54 virtual void PreEarlyInitialization() OVERRIDE;
55 virtual void PreMainMessageLoopStart() OVERRIDE;
56 virtual void PostMainMessageLoopStart() OVERRIDE;
57 virtual int PreCreateThreads() OVERRIDE;
58 virtual void PreMainMessageLoopRun() OVERRIDE;
59 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
60 virtual void PostMainMessageLoopRun() OVERRIDE;
61
62 // aura::RootWindowObserver overrides:
63 virtual void OnWindowTreeHostCloseRequested(const aura::RootWindow* root)
64 OVERRIDE;
65
66 private:
67 // Creates the window that hosts the apps.
68 void CreateRootWindow();
69
70 // Closes and destroys the root window hosting the app.
71 void DestroyRootWindow();
72
73 // Creates and initializes the ExtensionSystem.
74 void CreateExtensionSystem();
75
76 scoped_ptr<ShellBrowserContext> browser_context_;
77 scoped_ptr<ShellExtensionsClient> extensions_client_;
78 scoped_ptr<extensions::ShellExtensionsBrowserClient>
79 extensions_browser_client_;
80
81 // Enable a minimal set of views::corewm to be initialized.
82 scoped_ptr<wm::WMTestHelper> wm_test_helper_;
83
84 scoped_ptr<aura::TestScreen> test_screen_;
85
86 // Owned by the BrowserContextKeyedService system.
87 extensions::ShellExtensionSystem* extension_system_;
88
89 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts);
90 };
91
92 } // namespace apps
93
94 #endif // APPS_SHELL_SHELL_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « apps/shell/shell_browser_context.cc ('k') | apps/shell/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698