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

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: Use scoped_ptr to store DeviceDisplayInfo and make DeviceDisplayInfo getters const Created 5 years, 6 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/ui_android.gyp ('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 <vector> 9 #include <vector>
10 10
11 #include "base/android/jni_weak_ref.h" 11 #include "base/android/jni_weak_ref.h"
12 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "ui/android/ui_android_export.h" 15 #include "ui/android/ui_android_export.h"
16 #include "ui/gfx/android/device_display_info.h"
16 #include "ui/gfx/geometry/vector2d_f.h" 17 #include "ui/gfx/geometry/vector2d_f.h"
17 18
18 namespace ui { 19 namespace ui {
19 20
20 class WindowAndroidCompositor; 21 class WindowAndroidCompositor;
21 class WindowAndroidObserver; 22 class WindowAndroidObserver;
22 23
23 // Android implementation of the activity window. 24 // Android implementation of the activity window.
24 class UI_ANDROID_EXPORT WindowAndroid { 25 class UI_ANDROID_EXPORT WindowAndroid {
25 public: 26 public:
(...skipping 30 matching lines...) Expand all
56 void RequestVSyncUpdate(); 57 void RequestVSyncUpdate();
57 void SetNeedsAnimate(); 58 void SetNeedsAnimate();
58 void OnVSync(JNIEnv* env, 59 void OnVSync(JNIEnv* env,
59 jobject obj, 60 jobject obj,
60 jlong time_micros, 61 jlong time_micros,
61 jlong period_micros); 62 jlong period_micros);
62 void Animate(base::TimeTicks begin_frame_time); 63 void Animate(base::TimeTicks begin_frame_time);
63 void OnActivityPaused(JNIEnv* env, jobject obj); 64 void OnActivityPaused(JNIEnv* env, jobject obj);
64 void OnActivityResumed(JNIEnv* env, jobject obj); 65 void OnActivityResumed(JNIEnv* env, jobject obj);
65 66
67 const gfx::DeviceDisplayInfo & GetDeviceDisplayInfo();
jdduke (slow) 2015/06/17 15:56:05 Nit: no space before &, this patch probably deserv
gsennton 2015/06/18 11:37:22 Done.
68 void UpdateDeviceDisplayInfo();
69
66 private: 70 private:
67 ~WindowAndroid(); 71 ~WindowAndroid();
68 72
73 // TODO ScopedJavaLocalRef ok?
74 base::android::ScopedJavaLocalRef<jobject> GetJavaContext();
75
69 base::android::ScopedJavaGlobalRef<jobject> java_window_; 76 base::android::ScopedJavaGlobalRef<jobject> java_window_;
70 gfx::Vector2dF content_offset_; 77 gfx::Vector2dF content_offset_;
71 WindowAndroidCompositor* compositor_; 78 WindowAndroidCompositor* compositor_;
72 79
73 base::ObserverList<WindowAndroidObserver> observer_list_; 80 base::ObserverList<WindowAndroidObserver> observer_list_;
81 scoped_ptr<gfx::DeviceDisplayInfo> device_display_info_;
74 82
75 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 83 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
76 }; 84 };
77 85
78 } // namespace ui 86 } // namespace ui
79 87
80 #endif // UI_ANDROID_WINDOW_ANDROID_H_ 88 #endif // UI_ANDROID_WINDOW_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/android/ui_android.gyp ('k') | ui/android/window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698