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 CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/browser_main_parts.h"
11 #include "content/public/common/main_function_params.h"
13 #if defined(OS_ANDROID)
15 class CrashDumpManager
;
29 class ShellBrowserContext
;
30 class ShellDevToolsDelegate
;
31 class ShellPluginServiceFilter
;
33 class ShellBrowserMainParts
: public BrowserMainParts
{
35 explicit ShellBrowserMainParts(const MainFunctionParams
& parameters
);
36 virtual ~ShellBrowserMainParts();
38 // BrowserMainParts overrides.
39 virtual void PreEarlyInitialization() OVERRIDE
;
40 virtual void PreMainMessageLoopStart() OVERRIDE
;
41 virtual void PostMainMessageLoopStart() OVERRIDE
;
42 virtual void PreMainMessageLoopRun() OVERRIDE
;
43 virtual bool MainMessageLoopRun(int* result_code
) OVERRIDE
;
44 virtual void PostMainMessageLoopRun() OVERRIDE
;
46 ShellDevToolsDelegate
* devtools_delegate() {
47 return devtools_delegate_
.get();
50 ShellBrowserContext
* browser_context() { return browser_context_
.get(); }
51 ShellBrowserContext
* off_the_record_browser_context() {
52 return off_the_record_browser_context_
.get();
55 net::NetLog
* net_log() { return net_log_
.get(); }
58 #if defined(OS_ANDROID)
59 scoped_ptr
<breakpad::CrashDumpManager
> crash_dump_manager_
;
61 scoped_ptr
<net::NetLog
> net_log_
;
62 scoped_ptr
<ShellBrowserContext
> browser_context_
;
63 scoped_ptr
<ShellBrowserContext
> off_the_record_browser_context_
;
65 // For running content_browsertests.
66 const MainFunctionParams parameters_
;
67 bool run_message_loop_
;
69 scoped_ptr
<ShellDevToolsDelegate
> devtools_delegate_
;
70 #if defined(ENABLE_PLUGINS)
71 scoped_ptr
<ShellPluginServiceFilter
> plugin_service_filter_
;
74 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts
);
77 } // namespace content
79 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_