OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CONTENT_SHELL_SHELL_BROWSER_MAIN_H_ |
6 #define CONTENT_SHELL_SHELL_BROWSER_MAIN_H_ | 6 #define CONTENT_SHELL_SHELL_BROWSER_MAIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "content/browser/browser_main.h" | 11 #include "content/public/browser/browser_main_parts.h" |
11 | 12 |
12 class ResourceDispatcherHost; | 13 class ResourceDispatcherHost; |
| 14 struct MainFunctionParams; |
13 | 15 |
14 namespace base { | 16 namespace base { |
15 class Thread; | 17 class Thread; |
16 } | 18 } |
17 | 19 |
18 namespace ui { | 20 namespace ui { |
19 class Clipboard; | 21 class Clipboard; |
20 } | 22 } |
21 | 23 |
22 namespace content { | 24 namespace content { |
23 | 25 |
24 class ShellBrowserContext; | 26 class ShellBrowserContext; |
25 | 27 |
26 class ShellBrowserMainParts : public BrowserMainParts { | 28 class ShellBrowserMainParts : public BrowserMainParts { |
27 public: | 29 public: |
28 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); | 30 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); |
29 virtual ~ShellBrowserMainParts(); | 31 virtual ~ShellBrowserMainParts(); |
30 | 32 |
31 virtual void PreMainMessageLoopRun(); | 33 virtual void PreEarlyInitialization() OVERRIDE {} |
| 34 virtual void PostEarlyInitialization() OVERRIDE {} |
| 35 virtual void PreMainMessageLoopStart() OVERRIDE {} |
| 36 virtual void ToolkitInitialized() OVERRIDE {} |
| 37 virtual void PostMainMessageLoopStart() OVERRIDE {} |
| 38 virtual void PreMainMessageLoopRun() OVERRIDE; |
| 39 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
| 40 virtual void PostMainMessageLoopRun() {} |
32 | 41 |
33 ResourceDispatcherHost* GetResourceDispatcherHost(); | 42 ResourceDispatcherHost* GetResourceDispatcherHost(); |
34 ui::Clipboard* GetClipboard(); | 43 ui::Clipboard* GetClipboard(); |
35 | 44 |
36 base::Thread* io_thread() { return io_thread_.get(); } | 45 base::Thread* io_thread() { return io_thread_.get(); } |
37 base::Thread* file_thread() { return file_thread_.get(); } | 46 base::Thread* file_thread() { return file_thread_.get(); } |
38 | 47 |
39 private: | 48 private: |
40 scoped_ptr<ShellBrowserContext> browser_context_; | 49 scoped_ptr<ShellBrowserContext> browser_context_; |
41 | 50 |
42 scoped_ptr<ResourceDispatcherHost> resource_dispatcher_host_; | 51 scoped_ptr<ResourceDispatcherHost> resource_dispatcher_host_; |
43 scoped_ptr<ui::Clipboard> clipboard_; | 52 scoped_ptr<ui::Clipboard> clipboard_; |
44 | 53 |
45 scoped_ptr<base::Thread> io_thread_; | 54 scoped_ptr<base::Thread> io_thread_; |
46 scoped_ptr<base::Thread> file_thread_; | 55 scoped_ptr<base::Thread> file_thread_; |
47 scoped_ptr<base::Thread> db_thread_; | 56 scoped_ptr<base::Thread> db_thread_; |
48 scoped_ptr<base::Thread> process_launcher_thread_; | 57 scoped_ptr<base::Thread> process_launcher_thread_; |
49 scoped_ptr<base::Thread> cache_thread_; | 58 scoped_ptr<base::Thread> cache_thread_; |
50 | 59 |
51 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); | 60 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); |
52 }; | 61 }; |
53 | 62 |
54 } // namespace content | 63 } // namespace content |
55 | 64 |
56 #endif // CONTENT_SHELL_SHELL_BROWSER_MAIN_H_ | 65 #endif // CONTENT_SHELL_SHELL_BROWSER_MAIN_H_ |
OLD | NEW |