| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 const base::android::JavaParamRef<jobject>& obj); | 76 const base::android::JavaParamRef<jobject>& obj); |
| 77 | 77 |
| 78 // Return whether the specified Android permission is granted. | 78 // Return whether the specified Android permission is granted. |
| 79 bool HasPermission(const std::string& permission); | 79 bool HasPermission(const std::string& permission); |
| 80 // Return whether the specified Android permission can be requested by Chrome. | 80 // Return whether the specified Android permission can be requested by Chrome. |
| 81 bool CanRequestPermission(const std::string& permission); | 81 bool CanRequestPermission(const std::string& permission); |
| 82 | 82 |
| 83 static WindowAndroid* CreateForTesting(); | 83 static WindowAndroid* CreateForTesting(); |
| 84 void DestroyForTesting(); | 84 void DestroyForTesting(); |
| 85 | 85 |
| 86 // Return the window token for this window, if one exists. |
| 87 base::android::ScopedJavaLocalRef<jobject> GetWindowToken(); |
| 88 |
| 86 private: | 89 private: |
| 87 friend class DisplayAndroidManager; | 90 friend class DisplayAndroidManager; |
| 88 | 91 |
| 89 ~WindowAndroid() override; | 92 ~WindowAndroid() override; |
| 90 | 93 |
| 91 // ViewAndroid overrides. | 94 // ViewAndroid overrides. |
| 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 |