| 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_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ | 5 #ifndef UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ |
| 6 #define UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ | 6 #define UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.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 wm { | 17 namespace wm { |
| 18 class WMTestHelper; | 18 class WMTestHelper; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace views { | 21 namespace views { |
| 22 class ViewsDelegate; | 22 class ViewsDelegate; |
| 23 | 23 |
| 24 namespace corewm { |
| 25 class WMState; |
| 26 } |
| 27 |
| 24 namespace examples { | 28 namespace examples { |
| 25 | 29 |
| 26 class ExamplesBrowserMainParts : public content::BrowserMainParts { | 30 class ExamplesBrowserMainParts : public content::BrowserMainParts { |
| 27 public: | 31 public: |
| 28 explicit ExamplesBrowserMainParts( | 32 explicit ExamplesBrowserMainParts( |
| 29 const content::MainFunctionParams& parameters); | 33 const content::MainFunctionParams& parameters); |
| 30 virtual ~ExamplesBrowserMainParts(); | 34 virtual ~ExamplesBrowserMainParts(); |
| 31 | 35 |
| 32 // Overridden from content::BrowserMainParts: | 36 // Overridden from content::BrowserMainParts: |
| 37 virtual void ToolkitInitialized() OVERRIDE; |
| 33 virtual void PreMainMessageLoopRun() OVERRIDE; | 38 virtual void PreMainMessageLoopRun() OVERRIDE; |
| 34 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 39 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
| 35 virtual void PostMainMessageLoopRun() OVERRIDE; | 40 virtual void PostMainMessageLoopRun() OVERRIDE; |
| 36 | 41 |
| 37 content::ShellBrowserContext* browser_context() { | 42 content::ShellBrowserContext* browser_context() { |
| 38 return browser_context_.get(); | 43 return browser_context_.get(); |
| 39 } | 44 } |
| 40 | 45 |
| 41 private: | 46 private: |
| 42 scoped_ptr<content::ShellBrowserContext> browser_context_; | 47 scoped_ptr<content::ShellBrowserContext> browser_context_; |
| 43 | 48 |
| 44 scoped_ptr<ViewsDelegate> views_delegate_; | 49 scoped_ptr<ViewsDelegate> views_delegate_; |
| 45 | 50 |
| 46 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
| 47 // Enable a minimal set of views::corewm to be initialized. | 52 // Enable a minimal set of views::corewm to be initialized. |
| 48 scoped_ptr<wm::WMTestHelper> wm_test_helper_; | 53 scoped_ptr<wm::WMTestHelper> wm_test_helper_; |
| 49 #endif | 54 #endif |
| 50 | 55 |
| 56 #if defined(USE_AURA) |
| 57 scoped_ptr<views::corewm::WMState> wm_state_; |
| 58 #endif |
| 59 |
| 51 DISALLOW_COPY_AND_ASSIGN(ExamplesBrowserMainParts); | 60 DISALLOW_COPY_AND_ASSIGN(ExamplesBrowserMainParts); |
| 52 }; | 61 }; |
| 53 | 62 |
| 54 } // namespace examples | 63 } // namespace examples |
| 55 } // namespace views | 64 } // namespace views |
| 56 | 65 |
| 57 #endif // UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ | 66 #endif // UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |