| 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_BASE_ANDROID_WINDOW_ANDROID_H_ | 5 #ifndef UI_BASE_ANDROID_WINDOW_ANDROID_H_ |
| 6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_ | 6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | 29 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); |
| 30 | 30 |
| 31 static bool RegisterWindowAndroid(JNIEnv* env); | 31 static bool RegisterWindowAndroid(JNIEnv* env); |
| 32 | 32 |
| 33 // The content offset is used to translate snapshots to the correct part of | 33 // The content offset is used to translate snapshots to the correct part of |
| 34 // the window. | 34 // the window. |
| 35 void set_content_offset(const gfx::Vector2dF& content_offset) { | 35 void set_content_offset(const gfx::Vector2dF& content_offset) { |
| 36 content_offset_ = content_offset; | 36 content_offset_ = content_offset; |
| 37 } | 37 } |
| 38 | 38 |
| 39 gfx::Vector2dF content_offset() const { |
| 40 return content_offset_; |
| 41 } |
| 42 |
| 39 // Compositor callback relay. | 43 // Compositor callback relay. |
| 40 void OnCompositingDidCommit(); | 44 void OnCompositingDidCommit(); |
| 41 | 45 |
| 42 void AttachCompositor(WindowAndroidCompositor* compositor); | 46 void AttachCompositor(WindowAndroidCompositor* compositor); |
| 43 void DetachCompositor(); | 47 void DetachCompositor(); |
| 44 | 48 |
| 45 void AddObserver(WindowAndroidObserver* observer); | 49 void AddObserver(WindowAndroidObserver* observer); |
| 46 void RemoveObserver(WindowAndroidObserver* observer); | 50 void RemoveObserver(WindowAndroidObserver* observer); |
| 47 | 51 |
| 48 WindowAndroidCompositor* GetCompositor() { return compositor_; } | 52 WindowAndroidCompositor* GetCompositor() { return compositor_; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 61 base::TimeDelta vsync_period_; | 65 base::TimeDelta vsync_period_; |
| 62 | 66 |
| 63 ObserverList<WindowAndroidObserver> observer_list_; | 67 ObserverList<WindowAndroidObserver> observer_list_; |
| 64 | 68 |
| 65 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); | 69 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); |
| 66 }; | 70 }; |
| 67 | 71 |
| 68 } // namespace ui | 72 } // namespace ui |
| 69 | 73 |
| 70 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ | 74 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ |
| OLD | NEW |