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

Side by Side Diff: ui/views_content_client/views_content_client_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: rebase for horrible copyright header change in revert CL Created 6 years, 6 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 2014 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_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_
6 #define UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_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 {
18 class ViewsDelegate;
19 }
20
17 namespace wm { 21 namespace wm {
18 class WMState; 22 class WMState;
19 class WMTestHelper; 23 class WMTestHelper;
20 } 24 }
21 25
22 namespace views { 26 namespace ui {
23 class ViewsDelegate;
24 27
25 namespace examples { 28 class ViewsContentClient;
26 29
27 class ExamplesBrowserMainParts : public content::BrowserMainParts { 30 class ViewsContentClientMainParts : public content::BrowserMainParts {
28 public: 31 public:
29 explicit ExamplesBrowserMainParts( 32 ViewsContentClientMainParts(
30 const content::MainFunctionParams& parameters); 33 const content::MainFunctionParams& content_params,
31 virtual ~ExamplesBrowserMainParts(); 34 ViewsContentClient* views_content_client);
35 virtual ~ViewsContentClientMainParts();
32 36
33 // content::BrowserMainParts: 37 // content::BrowserMainParts:
34 virtual void ToolkitInitialized() OVERRIDE; 38 virtual void ToolkitInitialized() OVERRIDE;
35 virtual void PreMainMessageLoopRun() OVERRIDE; 39 virtual void PreMainMessageLoopRun() OVERRIDE;
36 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; 40 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
37 virtual void PostMainMessageLoopRun() OVERRIDE; 41 virtual void PostMainMessageLoopRun() OVERRIDE;
38 42
39 content::ShellBrowserContext* browser_context() { 43 content::ShellBrowserContext* browser_context() {
40 return browser_context_.get(); 44 return browser_context_.get();
41 } 45 }
42 46
43 private: 47 private:
44 scoped_ptr<content::ShellBrowserContext> browser_context_; 48 scoped_ptr<content::ShellBrowserContext> browser_context_;
45 49
46 scoped_ptr<ViewsDelegate> views_delegate_; 50 scoped_ptr<views::ViewsDelegate> views_delegate_;
47 51
48 #if defined(OS_CHROMEOS) 52 #if defined(OS_CHROMEOS)
49 // Enable a minimal set of views::corewm to be initialized. 53 // Enable a minimal set of views::corewm to be initialized.
50 scoped_ptr<wm::WMTestHelper> wm_test_helper_; 54 scoped_ptr<wm::WMTestHelper> wm_test_helper_;
51 #endif 55 #endif
52 56
53 scoped_ptr<wm::WMState> wm_state_; 57 scoped_ptr<wm::WMState> wm_state_;
54 58
55 DISALLOW_COPY_AND_ASSIGN(ExamplesBrowserMainParts); 59 ViewsContentClient* views_content_client_;
60
61 DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainParts);
56 }; 62 };
57 63
58 } // namespace examples 64 } // namespace ui
59 } // namespace views
60 65
61 #endif // UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_ 66 #endif // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « ui/views_content_client/views_content_client_export.h ('k') | ui/views_content_client/views_content_client_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698