| 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 UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ | 5 #ifndef UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ |
| 6 #define UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ | 6 #define UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.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 content { | 12 namespace content { |
| 13 class ShellBrowserContext; | 13 class ShellBrowserContext; |
| 14 struct MainFunctionParams; | 14 struct MainFunctionParams; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 class ViewsDelegate; | 18 class ViewsDelegate; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace wm { | |
| 22 class WMState; | |
| 23 class WMTestHelper; | |
| 24 } | |
| 25 | |
| 26 namespace ui { | 21 namespace ui { |
| 27 | 22 |
| 28 class ViewsContentClient; | 23 class ViewsContentClient; |
| 29 | 24 |
| 30 class ViewsContentClientMainParts : public content::BrowserMainParts { | 25 class ViewsContentClientMainParts : public content::BrowserMainParts { |
| 31 public: | 26 public: |
| 32 ViewsContentClientMainParts( | 27 // Platform-specific create function. |
| 28 static ViewsContentClientMainParts* Create( |
| 33 const content::MainFunctionParams& content_params, | 29 const content::MainFunctionParams& content_params, |
| 34 ViewsContentClient* views_content_client); | 30 ViewsContentClient* views_content_client); |
| 31 |
| 35 virtual ~ViewsContentClientMainParts(); | 32 virtual ~ViewsContentClientMainParts(); |
| 36 | 33 |
| 37 // content::BrowserMainParts: | 34 // content::BrowserMainParts: |
| 38 virtual void ToolkitInitialized() OVERRIDE; | |
| 39 virtual void PreMainMessageLoopRun() OVERRIDE; | 35 virtual void PreMainMessageLoopRun() OVERRIDE; |
| 40 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 36 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
| 41 virtual void PostMainMessageLoopRun() OVERRIDE; | 37 virtual void PostMainMessageLoopRun() OVERRIDE; |
| 42 | 38 |
| 43 content::ShellBrowserContext* browser_context() { | 39 content::ShellBrowserContext* browser_context() { |
| 44 return browser_context_.get(); | 40 return browser_context_.get(); |
| 45 } | 41 } |
| 46 | 42 |
| 43 ViewsContentClient* views_content_client() { |
| 44 return views_content_client_; |
| 45 } |
| 46 |
| 47 protected: |
| 48 ViewsContentClientMainParts( |
| 49 const content::MainFunctionParams& content_params, |
| 50 ViewsContentClient* views_content_client); |
| 51 |
| 47 private: | 52 private: |
| 48 scoped_ptr<content::ShellBrowserContext> browser_context_; | 53 scoped_ptr<content::ShellBrowserContext> browser_context_; |
| 49 | 54 |
| 50 scoped_ptr<views::ViewsDelegate> views_delegate_; | 55 scoped_ptr<views::ViewsDelegate> views_delegate_; |
| 51 | 56 |
| 52 #if defined(OS_CHROMEOS) | |
| 53 // Enable a minimal set of views::corewm to be initialized. | |
| 54 scoped_ptr<wm::WMTestHelper> wm_test_helper_; | |
| 55 #endif | |
| 56 | |
| 57 scoped_ptr<wm::WMState> wm_state_; | |
| 58 | |
| 59 ViewsContentClient* views_content_client_; | 57 ViewsContentClient* views_content_client_; |
| 60 | 58 |
| 61 DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainParts); | 59 DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainParts); |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 } // namespace ui | 62 } // namespace ui |
| 65 | 63 |
| 66 #endif // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ | 64 #endif // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ |
| OLD | NEW |