| 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 <list> | 9 #include <list> |
| 10 #include <memory> | 10 #include <memory> |
| (...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 void SetVSyncPaused(JNIEnv* env, |
| 78 const base::android::JavaParamRef<jobject>& obj, |
| 79 bool paused); |
| 77 | 80 |
| 78 // Return whether the specified Android permission is granted. | 81 // Return whether the specified Android permission is granted. |
| 79 bool HasPermission(const std::string& permission); | 82 bool HasPermission(const std::string& permission); |
| 80 // Return whether the specified Android permission can be requested by Chrome. | 83 // Return whether the specified Android permission can be requested by Chrome. |
| 81 bool CanRequestPermission(const std::string& permission); | 84 bool CanRequestPermission(const std::string& permission); |
| 82 | 85 |
| 83 static WindowAndroid* CreateForTesting(); | 86 static WindowAndroid* CreateForTesting(); |
| 84 void DestroyForTesting(); | 87 void DestroyForTesting(); |
| 85 | 88 |
| 86 private: | 89 private: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 108 std::unique_ptr<WindowBeginFrameSource> begin_frame_source_; | 111 std::unique_ptr<WindowBeginFrameSource> begin_frame_source_; |
| 109 bool needs_begin_frames_; | 112 bool needs_begin_frames_; |
| 110 std::list<base::Closure> vsync_complete_callbacks_; | 113 std::list<base::Closure> vsync_complete_callbacks_; |
| 111 | 114 |
| 112 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); | 115 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace ui | 118 } // namespace ui |
| 116 | 119 |
| 117 #endif // UI_ANDROID_WINDOW_ANDROID_H_ | 120 #endif // UI_ANDROID_WINDOW_ANDROID_H_ |
| OLD | NEW |