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_ANDROID_H_ | 5 #ifndef SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ |
6 #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ | 6 #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ |
7 | 7 |
8 #include "sky/shell/platform_view.h" | 8 #include "sky/shell/platform_view.h" |
9 | 9 |
10 struct ANativeWindow; | 10 struct ANativeWindow; |
11 | 11 |
12 namespace sky { | 12 namespace sky { |
13 namespace shell { | 13 namespace shell { |
14 | 14 |
15 class PlatformViewAndroid : public PlatformView { | 15 class PlatformViewAndroid : public PlatformView { |
16 public: | 16 public: |
17 static bool Register(JNIEnv* env); | 17 static bool Register(JNIEnv* env); |
18 ~PlatformViewAndroid() override; | 18 ~PlatformViewAndroid() override; |
19 | 19 |
20 // Called from Java | 20 // Called from Java |
21 void Detach(JNIEnv* env, jobject obj); | 21 void Detach(JNIEnv* env, jobject obj); |
22 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); | 22 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); |
23 void SurfaceDestroyed(JNIEnv* env, jobject obj); | 23 void SurfaceDestroyed(JNIEnv* env, jobject obj); |
24 | 24 |
25 private: | 25 private: |
26 void ReleaseWindow(); | 26 void ReleaseWindow(); |
27 | 27 |
28 ANativeWindow* window_; | |
29 | |
30 DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid); | 28 DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid); |
31 }; | 29 }; |
32 | 30 |
33 } // namespace shell | 31 } // namespace shell |
34 } // namespace sky | 32 } // namespace sky |
35 | 33 |
36 #endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ | 34 #endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ |
OLD | NEW |