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

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

Issue 1144333004: Make WebView work for external displays (over Presentations). Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor naming/comment fixes Created 5 years, 5 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
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>
11 11
12 #include "base/android/jni_weak_ref.h" 12 #include "base/android/jni_weak_ref.h"
13 #include "base/android/scoped_java_ref.h" 13 #include "base/android/scoped_java_ref.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "ui/android/ui_android_export.h" 16 #include "ui/android/ui_android_export.h"
17 #include "ui/gfx/android/device_display_info.h"
17 #include "ui/gfx/geometry/vector2d_f.h" 18 #include "ui/gfx/geometry/vector2d_f.h"
18 19
19 namespace ui { 20 namespace ui {
20 21
21 class WindowAndroidCompositor; 22 class WindowAndroidCompositor;
22 class WindowAndroidObserver; 23 class WindowAndroidObserver;
23 24
24 // Android implementation of the activity window. 25 // Android implementation of the activity window.
25 class UI_ANDROID_EXPORT WindowAndroid { 26 class UI_ANDROID_EXPORT WindowAndroid {
26 public: 27 public:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 jlong period_micros); 63 jlong period_micros);
63 void Animate(base::TimeTicks begin_frame_time); 64 void Animate(base::TimeTicks begin_frame_time);
64 void OnActivityPaused(JNIEnv* env, jobject obj); 65 void OnActivityPaused(JNIEnv* env, jobject obj);
65 void OnActivityResumed(JNIEnv* env, jobject obj); 66 void OnActivityResumed(JNIEnv* env, jobject obj);
66 67
67 // Return whether the specified Android permission is granted. 68 // Return whether the specified Android permission is granted.
68 bool HasPermission(const std::string& permission); 69 bool HasPermission(const std::string& permission);
69 // Return whether the specified Android permission can be requested by Chrome. 70 // Return whether the specified Android permission can be requested by Chrome.
70 bool CanRequestPermission(const std::string& permission); 71 bool CanRequestPermission(const std::string& permission);
71 72
73 const gfx::DeviceDisplayInfo& GetDeviceDisplayInfo();
74 void UpdateDeviceDisplayInfo();
75
76 base::android::ScopedJavaLocalRef<jobject> GetJavaDisplayContext();
boliu 2015/07/15 06:38:47 Looks like this is public only for ResourceManager
gsennton 2015/07/15 19:26:21 That should work, I am not sure how we would handl
boliu 2015/07/16 14:36:56 ResourceManager is created during construction, wh
gsennton 2015/10/20 13:27:12 I'm not sure how we would pass it from the Content
boliu 2015/10/20 15:07:22 Got lost in the pronoun game. What's "it" and "thi
gsennton 2015/10/20 18:46:44 Ah, sorry: I'm not sure how we would pass it = 't
boliu 2015/10/21 15:54:59 native WindowAndroid is already passed to Composit
gsennton 2015/10/21 16:35:32 Yes, but the problem is that GetJavaDisplayContext
77
72 private: 78 private:
73 ~WindowAndroid(); 79 ~WindowAndroid();
74 80
75 base::android::ScopedJavaGlobalRef<jobject> java_window_; 81 base::android::ScopedJavaGlobalRef<jobject> java_window_;
76 gfx::Vector2dF content_offset_; 82 gfx::Vector2dF content_offset_;
77 WindowAndroidCompositor* compositor_; 83 WindowAndroidCompositor* compositor_;
78 84
79 base::ObserverList<WindowAndroidObserver> observer_list_; 85 base::ObserverList<WindowAndroidObserver> observer_list_;
86 scoped_ptr<gfx::DeviceDisplayInfo> device_display_info_;
80 87
81 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 88 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
82 }; 89 };
83 90
84 } // namespace ui 91 } // namespace ui
85 92
86 #endif // UI_ANDROID_WINDOW_ANDROID_H_ 93 #endif // UI_ANDROID_WINDOW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698