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.
5 #ifndef APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_
6 #define APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_
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"
14 class ShellBrowserContext;
15 struct MainFunctionParams;
28 // Handles initialization of AppShell.
29 class AppShellBrowserMainParts : public content::BrowserMainParts {
31 explicit AppShellBrowserMainParts(
32 const content::MainFunctionParams& parameters);
33 virtual ~AppShellBrowserMainParts();
35 // BrowserMainParts overrides.
36 virtual void PreEarlyInitialization() OVERRIDE;
37 virtual void PreMainMessageLoopStart() OVERRIDE;
38 virtual void PostMainMessageLoopStart() OVERRIDE;
39 virtual void PreMainMessageLoopRun() OVERRIDE;
40 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
41 virtual void PostMainMessageLoopRun() OVERRIDE;
43 content::ShellBrowserContext* browser_context() {
44 return browser_context_.get();
48 scoped_ptr<content::ShellBrowserContext> browser_context_;
50 // Enable a minimal set of views::corewm to be initialized.
51 scoped_ptr<shell::MinimalShell> minimal_shell_;
53 DISALLOW_COPY_AND_ASSIGN(AppShellBrowserMainParts);
58 #endif // APPS_SHELL_APP_SHELL_BROWSER_MAIN_PARTS_H_