Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ui/android/window_android.h

Issue 1578353002: Pull the Activity context from WindowAndroid if possible (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2564
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/android/resources/resource_manager_impl_unittest.cc ('k') | ui/android/window_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 jlong period_micros); 62 jlong period_micros);
63 void OnVisibilityChanged(JNIEnv* env, jobject obj, bool visible); 63 void OnVisibilityChanged(JNIEnv* env, jobject obj, bool visible);
64 void OnActivityStopped(JNIEnv* env, jobject obj); 64 void OnActivityStopped(JNIEnv* env, jobject obj);
65 void OnActivityStarted(JNIEnv* env, jobject obj); 65 void OnActivityStarted(JNIEnv* env, jobject obj);
66 66
67 // Return whether the specified Android permission is granted. 67 // Return whether the specified Android permission is granted.
68 bool HasPermission(const std::string& permission); 68 bool HasPermission(const std::string& permission);
69 // Return whether the specified Android permission can be requested by Chrome. 69 // Return whether the specified Android permission can be requested by Chrome.
70 bool CanRequestPermission(const std::string& permission); 70 bool CanRequestPermission(const std::string& permission);
71 71
72 static WindowAndroid* createForTesting();
73
72 private: 74 private:
73 ~WindowAndroid(); 75 ~WindowAndroid();
74 76
75 base::android::ScopedJavaGlobalRef<jobject> java_window_; 77 base::android::ScopedJavaGlobalRef<jobject> java_window_;
76 gfx::Vector2dF content_offset_; 78 gfx::Vector2dF content_offset_;
77 WindowAndroidCompositor* compositor_; 79 WindowAndroidCompositor* compositor_;
78 80
79 base::ObserverList<WindowAndroidObserver> observer_list_; 81 base::ObserverList<WindowAndroidObserver> observer_list_;
80 82
81 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 83 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
82 }; 84 };
83 85
84 } // namespace ui 86 } // namespace ui
85 87
86 #endif // UI_ANDROID_WINDOW_ANDROID_H_ 88 #endif // UI_ANDROID_WINDOW_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/android/resources/resource_manager_impl_unittest.cc ('k') | ui/android/window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698