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; | |
14 | |
15 namespace base { | 13 namespace base { |
16 class Thread; | 14 class Thread; |
17 } | 15 } |
18 | 16 |
19 namespace ui { | 17 namespace ui { |
20 class Clipboard; | 18 class Clipboard; |
21 } | 19 } |
22 | 20 |
23 namespace content { | 21 namespace content { |
24 | 22 |
25 class ShellBrowserContext; | 23 class ShellBrowserContext; |
26 struct MainFunctionParams; | 24 struct MainFunctionParams; |
27 | 25 |
28 class ShellBrowserMainParts : public BrowserMainParts { | 26 class ShellBrowserMainParts : public BrowserMainParts { |
29 public: | 27 public: |
30 explicit ShellBrowserMainParts(const content::MainFunctionParams& parameters); | 28 explicit ShellBrowserMainParts(const content::MainFunctionParams& parameters); |
31 virtual ~ShellBrowserMainParts(); | 29 virtual ~ShellBrowserMainParts(); |
32 | 30 |
33 virtual void PreEarlyInitialization() OVERRIDE {} | 31 virtual void PreEarlyInitialization() OVERRIDE {} |
34 virtual void PostEarlyInitialization() OVERRIDE {} | 32 virtual void PostEarlyInitialization() OVERRIDE {} |
35 virtual void PreMainMessageLoopStart() OVERRIDE {} | 33 virtual void PreMainMessageLoopStart() OVERRIDE {} |
36 virtual void ToolkitInitialized() OVERRIDE {} | 34 virtual void ToolkitInitialized() OVERRIDE {} |
37 virtual void PostMainMessageLoopStart() OVERRIDE {} | 35 virtual void PostMainMessageLoopStart() OVERRIDE {} |
38 virtual void PreCreateThreads() OVERRIDE {} | 36 virtual void PreCreateThreads() OVERRIDE {} |
39 virtual void PreStartThread(BrowserThread::ID id) OVERRIDE {} | |
40 virtual void PostStartThread(BrowserThread::ID id) OVERRIDE {} | |
41 virtual void PreMainMessageLoopRun() OVERRIDE; | 37 virtual void PreMainMessageLoopRun() OVERRIDE; |
42 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 38 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
43 virtual void PostMainMessageLoopRun() OVERRIDE; | 39 virtual void PostMainMessageLoopRun() OVERRIDE; |
44 virtual void PreStopThread(BrowserThread::ID id) OVERRIDE; | |
45 virtual void PostStopThread(BrowserThread::ID) OVERRIDE {} | |
46 virtual void PostDestroyThreads() OVERRIDE {} | 40 virtual void PostDestroyThreads() OVERRIDE {} |
47 | 41 |
48 ResourceDispatcherHost* GetResourceDispatcherHost(); | |
49 ui::Clipboard* GetClipboard(); | 42 ui::Clipboard* GetClipboard(); |
50 | 43 |
51 private: | 44 private: |
52 scoped_ptr<ShellBrowserContext> browser_context_; | 45 scoped_ptr<ShellBrowserContext> browser_context_; |
53 | 46 |
54 scoped_ptr<ResourceDispatcherHost> resource_dispatcher_host_; | |
55 scoped_ptr<ui::Clipboard> clipboard_; | 47 scoped_ptr<ui::Clipboard> clipboard_; |
56 | 48 |
57 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); | 49 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); |
58 }; | 50 }; |
59 | 51 |
60 } // namespace content | 52 } // namespace content |
61 | 53 |
62 #endif // CONTENT_SHELL_SHELL_BROWSER_MAIN_H_ | 54 #endif // CONTENT_SHELL_SHELL_BROWSER_MAIN_H_ |
OLD | NEW |