1 // Copyright (c) 2012 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_SHELL_BROWSER_MAIN_PARTS_H_
6 #define CONTENT_SHELL_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"
18 class ShellBrowserContext
;
19 class ShellDevToolsDelegate
;
20 struct MainFunctionParams
;
22 class ShellBrowserMainParts
: public BrowserMainParts
{
24 explicit ShellBrowserMainParts(const MainFunctionParams
& parameters
);
25 virtual ~ShellBrowserMainParts();
27 // BrowserMainParts overrides.
28 virtual void PreEarlyInitialization() OVERRIDE
;
29 virtual void PreMainMessageLoopStart() OVERRIDE
;
30 virtual void PostMainMessageLoopStart() OVERRIDE
;
31 virtual void PreMainMessageLoopRun() OVERRIDE
;
32 virtual bool MainMessageLoopRun(int* result_code
) OVERRIDE
;
33 virtual void PostMainMessageLoopRun() OVERRIDE
;
35 ShellDevToolsDelegate
* devtools_delegate() { return devtools_delegate_
; }
37 ShellBrowserContext
* browser_context() { return browser_context_
.get(); }
38 ShellBrowserContext
* off_the_record_browser_context() {
39 return off_the_record_browser_context_
.get();
43 scoped_ptr
<ShellBrowserContext
> browser_context_
;
44 scoped_ptr
<ShellBrowserContext
> off_the_record_browser_context_
;
46 // For running content_browsertests.
47 const MainFunctionParams
& parameters_
;
48 bool run_message_loop_
;
50 ShellDevToolsDelegate
* devtools_delegate_
;
52 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts
);
55 } // namespace content
57 #endif // CONTENT_SHELL_SHELL_BROWSER_MAIN_PARTS_H_