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