Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: ui/views/examples/content_client/examples_browser_main_parts.h

Issue 284113011: Repurpose views+content example into a generic multiprocess views runtime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: app_list_demo.cc using example_main Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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 wm { 17 namespace wm {
18 class WMState; 18 class WMState;
19 class WMTestHelper; 19 class WMTestHelper;
20 } 20 }
21 21
22 namespace views { 22 namespace views {
23 class ViewsDelegate; 23 class ViewsDelegate;
24 24
25 namespace examples { 25 namespace examples {
26 26
27 class ExamplesMainParams;
28
27 class ExamplesBrowserMainParts : public content::BrowserMainParts { 29 class ExamplesBrowserMainParts : public content::BrowserMainParts {
28 public: 30 public:
29 explicit ExamplesBrowserMainParts( 31 ExamplesBrowserMainParts(
30 const content::MainFunctionParams& parameters); 32 const content::MainFunctionParams& content_params,
33 ExamplesMainParams* examples_params);
31 virtual ~ExamplesBrowserMainParts(); 34 virtual ~ExamplesBrowserMainParts();
32 35
33 // content::BrowserMainParts: 36 // content::BrowserMainParts:
34 virtual void ToolkitInitialized() OVERRIDE; 37 virtual void ToolkitInitialized() OVERRIDE;
35 virtual void PreMainMessageLoopRun() OVERRIDE; 38 virtual void PreMainMessageLoopRun() OVERRIDE;
36 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; 39 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
37 virtual void PostMainMessageLoopRun() OVERRIDE; 40 virtual void PostMainMessageLoopRun() OVERRIDE;
38 41
39 content::ShellBrowserContext* browser_context() { 42 content::ShellBrowserContext* browser_context() {
40 return browser_context_.get(); 43 return browser_context_.get();
41 } 44 }
42 45
43 private: 46 private:
44 scoped_ptr<content::ShellBrowserContext> browser_context_; 47 scoped_ptr<content::ShellBrowserContext> browser_context_;
45 48
46 scoped_ptr<ViewsDelegate> views_delegate_; 49 scoped_ptr<ViewsDelegate> views_delegate_;
47 50
48 #if defined(OS_CHROMEOS) 51 #if defined(OS_CHROMEOS)
49 // Enable a minimal set of views::corewm to be initialized. 52 // Enable a minimal set of views::corewm to be initialized.
50 scoped_ptr<wm::WMTestHelper> wm_test_helper_; 53 scoped_ptr<wm::WMTestHelper> wm_test_helper_;
51 #endif 54 #endif
52 55
53 scoped_ptr<wm::WMState> wm_state_; 56 scoped_ptr<wm::WMState> wm_state_;
54 57
58 ExamplesMainParams* examples_params_;
59
55 DISALLOW_COPY_AND_ASSIGN(ExamplesBrowserMainParts); 60 DISALLOW_COPY_AND_ASSIGN(ExamplesBrowserMainParts);
56 }; 61 };
57 62
58 } // namespace examples 63 } // namespace examples
59 } // namespace views 64 } // namespace views
60 65
61 #endif // UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ 66 #endif // UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_demo.cc ('k') | ui/views/examples/content_client/examples_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698