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