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_SKY_VIEW_H_ | 5 #ifndef SKY_SHELL_SKY_VIEW_H_ |
6 #define SKY_SHELL_SKY_VIEW_H_ | 6 #define SKY_SHELL_SKY_VIEW_H_ |
7 | 7 |
8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "sky/shell/gpu_delegate.h" | |
14 #include "sky/shell/ui_delegate.h" | 13 #include "sky/shell/ui_delegate.h" |
15 | 14 |
16 struct ANativeWindow; | 15 struct ANativeWindow; |
17 | 16 |
18 namespace sky { | 17 namespace sky { |
19 namespace shell { | 18 namespace shell { |
20 | 19 |
21 class PlatformView { | 20 class PlatformView { |
22 public: | 21 public: |
23 struct Config { | 22 struct Config { |
24 base::WeakPtr<GPUDelegate> gpu_delegate; | |
25 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner; | |
26 | |
27 base::WeakPtr<UIDelegate> ui_delegate; | 23 base::WeakPtr<UIDelegate> ui_delegate; |
28 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; | 24 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; |
29 }; | 25 }; |
30 | 26 |
31 static bool Register(JNIEnv* env); | 27 static bool Register(JNIEnv* env); |
32 | 28 |
33 explicit PlatformView(const Config& config); | 29 explicit PlatformView(const Config& config); |
34 ~PlatformView(); | 30 ~PlatformView(); |
35 | 31 |
36 void ConnectToViewportObserver( | 32 void ConnectToViewportObserver( |
(...skipping 15 matching lines...) Expand all Loading... |
52 Config config_; | 48 Config config_; |
53 ANativeWindow* window_; | 49 ANativeWindow* window_; |
54 | 50 |
55 DISALLOW_COPY_AND_ASSIGN(PlatformView); | 51 DISALLOW_COPY_AND_ASSIGN(PlatformView); |
56 }; | 52 }; |
57 | 53 |
58 } // namespace shell | 54 } // namespace shell |
59 } // namespace sky | 55 } // namespace sky |
60 | 56 |
61 #endif // SKY_SHELL_SKY_VIEW_H_ | 57 #endif // SKY_SHELL_SKY_VIEW_H_ |
OLD | NEW |