OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_SHELL_SHELL_BROWSER_MAIN_PARTS_H_ | 5 #ifndef CONTENT_SHELL_SHELL_BROWSER_MAIN_PARTS_H_ |
6 #define CONTENT_SHELL_SHELL_BROWSER_MAIN_PARTS_H_ | 6 #define CONTENT_SHELL_SHELL_BROWSER_MAIN_PARTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/browser/browser_main_parts.h" | 10 #include "content/public/browser/browser_main_parts.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class Thread; | 13 class Thread; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class ShellBrowserContext; | 18 class ShellBrowserContext; |
19 class ShellDevToolsDelegate; | 19 class ShellDevToolsDelegate; |
20 struct MainFunctionParams; | 20 struct MainFunctionParams; |
21 | 21 |
22 class ShellBrowserMainParts : public BrowserMainParts { | 22 class ShellBrowserMainParts : public BrowserMainParts { |
23 public: | 23 public: |
24 explicit ShellBrowserMainParts(const content::MainFunctionParams& parameters); | 24 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); |
25 virtual ~ShellBrowserMainParts(); | 25 virtual ~ShellBrowserMainParts(); |
26 | 26 |
27 // content::BrowserMainParts overrides. | 27 // BrowserMainParts overrides. |
28 virtual void PreEarlyInitialization() OVERRIDE; | 28 virtual void PreEarlyInitialization() OVERRIDE; |
29 virtual void PreMainMessageLoopStart() OVERRIDE; | 29 virtual void PreMainMessageLoopStart() OVERRIDE; |
30 virtual void PostMainMessageLoopStart() OVERRIDE; | 30 virtual void PostMainMessageLoopStart() OVERRIDE; |
31 virtual void PreMainMessageLoopRun() OVERRIDE; | 31 virtual void PreMainMessageLoopRun() OVERRIDE; |
| 32 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
32 virtual void PostMainMessageLoopRun() OVERRIDE; | 33 virtual void PostMainMessageLoopRun() OVERRIDE; |
33 | 34 |
34 ShellDevToolsDelegate* devtools_delegate() { return devtools_delegate_; } | 35 ShellDevToolsDelegate* devtools_delegate() { return devtools_delegate_; } |
35 | 36 |
36 ShellBrowserContext* browser_context() { return browser_context_.get(); } | 37 ShellBrowserContext* browser_context() { return browser_context_.get(); } |
37 | 38 |
38 private: | 39 private: |
39 scoped_ptr<ShellBrowserContext> browser_context_; | 40 scoped_ptr<ShellBrowserContext> browser_context_; |
40 | 41 |
| 42 // For running content_browsertests. |
| 43 const MainFunctionParams& parameters_; |
| 44 bool run_message_loop_; |
| 45 |
41 ShellDevToolsDelegate* devtools_delegate_; | 46 ShellDevToolsDelegate* devtools_delegate_; |
42 | 47 |
43 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); | 48 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); |
44 }; | 49 }; |
45 | 50 |
46 } // namespace content | 51 } // namespace content |
47 | 52 |
48 #endif // CONTENT_SHELL_SHELL_BROWSER_MAIN_PARTS_H_ | 53 #endif // CONTENT_SHELL_SHELL_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |