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 12 matching lines...) Expand all Loading... |
23 class UI_BASE_EXPORT WindowAndroid { | 23 class UI_BASE_EXPORT WindowAndroid { |
24 public: | 24 public: |
25 WindowAndroid(JNIEnv* env, jobject obj, jlong vsync_period); | 25 WindowAndroid(JNIEnv* env, jobject obj, jlong vsync_period); |
26 | 26 |
27 void Destroy(JNIEnv* env, jobject obj); | 27 void Destroy(JNIEnv* env, jobject obj); |
28 | 28 |
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 (in DIP space) is used to translate snapshots to the |
34 // the window. | 34 // correct part of 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 { | 39 gfx::Vector2dF content_offset() const { |
40 return content_offset_; | 40 return content_offset_; |
41 } | 41 } |
42 | 42 |
43 // Compositor callback relay. | 43 // Compositor callback relay. |
44 void OnCompositingDidCommit(); | 44 void OnCompositingDidCommit(); |
(...skipping 20 matching lines...) Expand all Loading... |
65 base::TimeDelta vsync_period_; | 65 base::TimeDelta vsync_period_; |
66 | 66 |
67 ObserverList<WindowAndroidObserver> observer_list_; | 67 ObserverList<WindowAndroidObserver> observer_list_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); | 69 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace ui | 72 } // namespace ui |
73 | 73 |
74 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ | 74 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ |
OLD | NEW |