OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 UI_ANDROID_WINDOW_ANDROID_H_ | 5 #ifndef UI_ANDROID_WINDOW_ANDROID_H_ |
6 #define UI_ANDROID_WINDOW_ANDROID_H_ | 6 #define UI_ANDROID_WINDOW_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 const base::android::JavaParamRef<jobject>& obj, | 67 const base::android::JavaParamRef<jobject>& obj, |
68 jlong time_micros, | 68 jlong time_micros, |
69 jlong period_micros); | 69 jlong period_micros); |
70 void OnVisibilityChanged(JNIEnv* env, | 70 void OnVisibilityChanged(JNIEnv* env, |
71 const base::android::JavaParamRef<jobject>& obj, | 71 const base::android::JavaParamRef<jobject>& obj, |
72 bool visible); | 72 bool visible); |
73 void OnActivityStopped(JNIEnv* env, | 73 void OnActivityStopped(JNIEnv* env, |
74 const base::android::JavaParamRef<jobject>& obj); | 74 const base::android::JavaParamRef<jobject>& obj); |
75 void OnActivityStarted(JNIEnv* env, | 75 void OnActivityStarted(JNIEnv* env, |
76 const base::android::JavaParamRef<jobject>& obj); | 76 const base::android::JavaParamRef<jobject>& obj); |
77 base::android::ScopedJavaLocalRef<jobject> GetEventHandler(JNIEnv* env, | |
boliu
2016/12/14 01:26:42
nit: this is function overloading, which is banned
Jinsuk Kim
2016/12/14 01:35:56
Done. Chose the latter.
| |
78 const base::android::JavaParamRef<jobject>& obj); | |
77 | 79 |
78 // Return whether the specified Android permission is granted. | 80 // Return whether the specified Android permission is granted. |
79 bool HasPermission(const std::string& permission); | 81 bool HasPermission(const std::string& permission); |
80 // Return whether the specified Android permission can be requested by Chrome. | 82 // Return whether the specified Android permission can be requested by Chrome. |
81 bool CanRequestPermission(const std::string& permission); | 83 bool CanRequestPermission(const std::string& permission); |
82 | 84 |
83 static WindowAndroid* CreateForTesting(); | 85 static WindowAndroid* CreateForTesting(); |
84 void DestroyForTesting(); | 86 void DestroyForTesting(); |
85 | 87 |
86 private: | 88 private: |
87 friend class DisplayAndroidManager; | 89 friend class DisplayAndroidManager; |
88 | 90 |
89 ~WindowAndroid() override; | 91 ~WindowAndroid() override; |
90 | 92 |
91 // ViewAndroid overrides. | 93 // ViewAndroid overrides. |
94 using ViewAndroid::GetEventHandler; | |
boliu
2016/12/14 01:26:42
this should not be required I think? a function th
Jinsuk Kim
2016/12/14 01:35:56
GetEventHandler above was hiding the overloaded on
| |
92 WindowAndroid* GetWindowAndroid() const override; | 95 WindowAndroid* GetWindowAndroid() const override; |
93 | 96 |
94 // The ID of the display that this window belongs to. | 97 // The ID of the display that this window belongs to. |
95 int display_id() const { return display_id_; } | 98 int display_id() const { return display_id_; } |
96 | 99 |
97 base::android::ScopedJavaGlobalRef<jobject> java_window_; | 100 base::android::ScopedJavaGlobalRef<jobject> java_window_; |
98 const int display_id_; | 101 const int display_id_; |
99 gfx::Vector2dF content_offset_; | 102 gfx::Vector2dF content_offset_; |
100 WindowAndroidCompositor* compositor_; | 103 WindowAndroidCompositor* compositor_; |
101 | 104 |
102 base::ObserverList<WindowAndroidObserver> observer_list_; | 105 base::ObserverList<WindowAndroidObserver> observer_list_; |
103 | 106 |
104 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); | 107 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); |
105 }; | 108 }; |
106 | 109 |
107 } // namespace ui | 110 } // namespace ui |
108 | 111 |
109 #endif // UI_ANDROID_WINDOW_ANDROID_H_ | 112 #endif // UI_ANDROID_WINDOW_ANDROID_H_ |
OLD | NEW |