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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 base::WeakPtr<UIDelegate> ui_delegate; | 27 base::WeakPtr<UIDelegate> ui_delegate; |
28 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; | 28 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner; |
29 }; | 29 }; |
30 | 30 |
31 static bool Register(JNIEnv* env); | 31 static bool Register(JNIEnv* env); |
32 | 32 |
33 explicit PlatformView(const Config& config); | 33 explicit PlatformView(const Config& config); |
34 ~PlatformView(); | 34 ~PlatformView(); |
35 | 35 |
| 36 void ConnectToViewportObserver( |
| 37 mojo::InterfaceRequest<ViewportObserver> request); |
| 38 |
36 // Called from Java | 39 // Called from Java |
37 void Detach(JNIEnv* env, jobject obj); | 40 void Detach(JNIEnv* env, jobject obj); |
38 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); | 41 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); |
39 void SurfaceDestroyed(JNIEnv* env, jobject obj); | 42 void SurfaceDestroyed(JNIEnv* env, jobject obj); |
40 void SurfaceSetSize(JNIEnv* env, | 43 void SurfaceSetSize(JNIEnv* env, |
41 jobject obj, | 44 jobject obj, |
42 jint width, | 45 jint width, |
43 jint height, | 46 jint height, |
44 jfloat density); | 47 jfloat density); |
45 | 48 |
46 private: | 49 private: |
47 void ReleaseWindow(); | 50 void ReleaseWindow(); |
48 | 51 |
49 Config config_; | 52 Config config_; |
50 ANativeWindow* window_; | 53 ANativeWindow* window_; |
51 | 54 |
52 DISALLOW_COPY_AND_ASSIGN(PlatformView); | 55 DISALLOW_COPY_AND_ASSIGN(PlatformView); |
53 }; | 56 }; |
54 | 57 |
55 } // namespace shell | 58 } // namespace shell |
56 } // namespace sky | 59 } // namespace sky |
57 | 60 |
58 #endif // SKY_SHELL_SKY_VIEW_H_ | 61 #endif // SKY_SHELL_SKY_VIEW_H_ |
OLD | NEW |