OLD | NEW |
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 Config(); |
| 19 ~Config(); |
| 20 |
18 base::WeakPtr<UIDelegate> ui_delegate; | 21 base::WeakPtr<UIDelegate> ui_delegate; |
19 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; | 22 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; |
20 }; | 23 }; |
21 | 24 |
22 static PlatformView* Create(const Config& config); | 25 static PlatformView* Create(const Config& config); |
23 | 26 |
24 virtual ~PlatformView(); | 27 virtual ~PlatformView(); |
25 | 28 |
26 void ConnectToViewportObserver( | 29 void ConnectToViewportObserver( |
27 mojo::InterfaceRequest<ViewportObserver> request); | 30 mojo::InterfaceRequest<ViewportObserver> request); |
28 | 31 |
29 protected: | 32 protected: |
30 explicit PlatformView(const Config& config); | 33 explicit PlatformView(const Config& config); |
31 | 34 |
32 void SurfaceWasCreated(); | 35 void SurfaceWasCreated(); |
33 void SurfaceWasDestroyed(); | 36 void SurfaceWasDestroyed(); |
34 | 37 |
35 Config config_; | 38 Config config_; |
36 gfx::AcceleratedWidget window_; | 39 gfx::AcceleratedWidget window_; |
37 | 40 |
38 private: | 41 private: |
39 DISALLOW_COPY_AND_ASSIGN(PlatformView); | 42 DISALLOW_COPY_AND_ASSIGN(PlatformView); |
40 }; | 43 }; |
41 | 44 |
42 } // namespace shell | 45 } // namespace shell |
43 } // namespace sky | 46 } // namespace sky |
44 | 47 |
45 #endif // SKY_SHELL_PLATFORM_VIEW_H_ | 48 #endif // SKY_SHELL_PLATFORM_VIEW_H_ |
OLD | NEW |