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

Side by Side Diff: sky/shell/platform_view.h

Issue 1187503003: Refactor SkyShell to allow multiple SkyViews (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: s/instance/sky_shell/ Created 5 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
« no previous file with comments | « sky/shell/ios/sky_view_controller.mm ('k') | sky/shell/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SKY_SHELL_PLATFORM_VIEW_H_ 5 #ifndef SKY_SHELL_PLATFORM_VIEW_H_
6 #define SKY_SHELL_PLATFORM_VIEW_H_ 6 #define SKY_SHELL_PLATFORM_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "sky/shell/ui_delegate.h" 10 #include "sky/shell/ui_delegate.h"
11 11
12 namespace sky { 12 namespace sky {
13 namespace shell { 13 namespace shell {
14 14
15 class PlatformView { 15 class PlatformView {
16 public: 16 public:
17 struct Config { 17 struct Config {
18 base::WeakPtr<UIDelegate> ui_delegate; 18 base::WeakPtr<UIDelegate> ui_delegate;
19 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; 19 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner;
20 }; 20 };
21 21
22 explicit PlatformView(const Config& config); 22 static PlatformView* Create(const Config& config);
23
23 virtual ~PlatformView(); 24 virtual ~PlatformView();
24 25
25 void ConnectToViewportObserver( 26 void ConnectToViewportObserver(
26 mojo::InterfaceRequest<ViewportObserver> request); 27 mojo::InterfaceRequest<ViewportObserver> request);
27 28
28 protected: 29 protected:
30 explicit PlatformView(const Config& config);
31
29 void SurfaceWasCreated(); 32 void SurfaceWasCreated();
30 void SurfaceWasDestroyed(); 33 void SurfaceWasDestroyed();
31 34
32 Config config_; 35 Config config_;
33 gfx::AcceleratedWidget window_; 36 gfx::AcceleratedWidget window_;
34 37
35 private: 38 private:
36 DISALLOW_COPY_AND_ASSIGN(PlatformView); 39 DISALLOW_COPY_AND_ASSIGN(PlatformView);
37 }; 40 };
38 41
39 } // namespace shell 42 } // namespace shell
40 } // namespace sky 43 } // namespace sky
41 44
42 #endif // SKY_SHELL_PLATFORM_VIEW_H_ 45 #endif // SKY_SHELL_PLATFORM_VIEW_H_
OLDNEW
« no previous file with comments | « sky/shell/ios/sky_view_controller.mm ('k') | sky/shell/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698