OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ | |
6 #define UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "content/public/browser/browser_main_parts.h" | |
11 | |
12 namespace content { | |
13 class ShellBrowserContext; | |
14 struct MainFunctionParams; | |
15 } | |
16 | |
17 namespace views { | |
18 class ViewsDelegate; | |
19 } | |
20 | |
21 namespace wm { | |
22 class WMState; | |
23 class WMTestHelper; | |
24 } | |
25 | |
26 namespace ui { | |
27 | |
28 class ViewsContentClient; | |
29 | |
30 class ViewsContentClientMainParts : public content::BrowserMainParts { | |
31 public: | |
32 ViewsContentClientMainParts( | |
33 const content::MainFunctionParams& content_params, | |
34 ViewsContentClient* views_content_client); | |
35 virtual ~ViewsContentClientMainParts(); | |
36 | |
37 // content::BrowserMainParts: | |
38 virtual void ToolkitInitialized() OVERRIDE; | |
39 virtual void PreMainMessageLoopRun() OVERRIDE; | |
40 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | |
41 virtual void PostMainMessageLoopRun() OVERRIDE; | |
42 | |
43 content::ShellBrowserContext* browser_context() { | |
44 return browser_context_.get(); | |
45 } | |
46 | |
47 private: | |
48 scoped_ptr<content::ShellBrowserContext> browser_context_; | |
49 | |
50 scoped_ptr<views::ViewsDelegate> views_delegate_; | |
51 | |
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_; | |
60 | |
61 DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainParts); | |
62 }; | |
63 | |
64 } // namespace ui | |
65 | |
66 #endif // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_ | |
OLD | NEW |