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

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

Issue 2249243002: Remove dip scale dependency from ui::WindowAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 4 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>
(...skipping 17 matching lines...) Expand all
28 class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid { 28 class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
29 public: 29 public:
30 WindowAndroid(JNIEnv* env, jobject obj); 30 WindowAndroid(JNIEnv* env, jobject obj);
31 31
32 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 32 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
33 33
34 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); 34 base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
35 35
36 static bool RegisterWindowAndroid(JNIEnv* env); 36 static bool RegisterWindowAndroid(JNIEnv* env);
37 37
38 // The content offset is used to translate snapshots to the correct part of 38 // The content offset in CSS pixels. It is used together with device scale
39 // the window. 39 // factor to translate snapshots to the correct part of the window.
40 void set_content_offset(const gfx::Vector2dF& content_offset) { 40 void set_content_offset(const gfx::Vector2dF& content_offset) {
41 content_offset_ = content_offset; 41 content_offset_ = content_offset;
42 } 42 }
43 43
44 gfx::Vector2dF content_offset() const { 44 gfx::Vector2dF content_offset() const {
45 return content_offset_; 45 return content_offset_;
46 } 46 }
47 47
48 // Compositor callback relay. 48 // Compositor callback relay.
49 void OnCompositingDidCommit(); 49 void OnCompositingDidCommit();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 WindowAndroidCompositor* compositor_; 89 WindowAndroidCompositor* compositor_;
90 90
91 base::ObserverList<WindowAndroidObserver> observer_list_; 91 base::ObserverList<WindowAndroidObserver> observer_list_;
92 92
93 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 93 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
94 }; 94 };
95 95
96 } // namespace ui 96 } // namespace ui
97 97
98 #endif // UI_ANDROID_WINDOW_ANDROID_H_ 98 #endif // UI_ANDROID_WINDOW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698