| 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 17 matching lines...) Expand all Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |