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_VIEW_ANDROID_H_ | 5 #ifndef UI_ANDROID_VIEW_ANDROID_H_ |
6 #define UI_ANDROID_VIEW_ANDROID_H_ | 6 #define UI_ANDROID_VIEW_ANDROID_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "ui/android/ui_android_export.h" | 13 #include "ui/android/ui_android_export.h" |
14 #include "ui/gfx/geometry/rect_f.h" | 14 #include "ui/gfx/geometry/rect_f.h" |
15 | 15 |
| 16 class SkBitmap; |
| 17 |
16 namespace cc { | 18 namespace cc { |
17 class Layer; | 19 class Layer; |
18 } | 20 } |
19 | 21 |
| 22 namespace gfx { |
| 23 class Point; |
| 24 } |
| 25 |
20 namespace ui { | 26 namespace ui { |
21 class EventForwarder; | 27 class EventForwarder; |
22 class MotionEventAndroid; | 28 class MotionEventAndroid; |
23 class ViewClient; | 29 class ViewClient; |
24 class WindowAndroid; | 30 class WindowAndroid; |
25 | 31 |
26 // A simple container for a UI layer. | 32 // A simple container for a UI layer. |
27 // At the root of the hierarchy is a WindowAndroid, when attached. | 33 // At the root of the hierarchy is a WindowAndroid, when attached. |
28 // Dispatches input/view events coming from Java layer. Hit testing against | 34 // Dispatches input/view events coming from Java layer. Hit testing against |
29 // those events is implemented so that the |ViewClient| will be invoked | 35 // those events is implemented so that the |ViewClient| will be invoked |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 void RemoveFromParent(); | 134 void RemoveFromParent(); |
129 | 135 |
130 // Sets the layout relative to parent. Used to do hit testing against events. | 136 // Sets the layout relative to parent. Used to do hit testing against events. |
131 void SetLayout(LayoutParams params); | 137 void SetLayout(LayoutParams params); |
132 | 138 |
133 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, | 139 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, |
134 const base::android::JavaRef<jobject>& jimage); | 140 const base::android::JavaRef<jobject>& jimage); |
135 | 141 |
136 gfx::Size GetPhysicalBackingSize(); | 142 gfx::Size GetPhysicalBackingSize(); |
137 void OnPhysicalBackingSizeChanged(const gfx::Size& size); | 143 void OnPhysicalBackingSizeChanged(const gfx::Size& size); |
| 144 void OnCursorChanged(int type, |
| 145 const SkBitmap& custom_image, |
| 146 const gfx::Point& hotspot); |
138 void OnBackgroundColorChanged(unsigned int color); | 147 void OnBackgroundColorChanged(unsigned int color); |
139 void OnTopControlsChanged(float top_controls_offset, | 148 void OnTopControlsChanged(float top_controls_offset, |
140 float top_content_offset); | 149 float top_content_offset); |
141 void OnBottomControlsChanged(float bottom_controls_offset, | 150 void OnBottomControlsChanged(float bottom_controls_offset, |
142 float bottom_content_offset); | 151 float bottom_content_offset); |
143 int GetSystemWindowInsetBottom(); | 152 int GetSystemWindowInsetBottom(); |
144 | 153 |
145 ScopedAnchorView AcquireAnchorView(); | 154 ScopedAnchorView AcquireAnchorView(); |
146 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, | 155 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, |
147 const gfx::RectF& bounds); | 156 const gfx::RectF& bounds); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 216 |
208 gfx::Vector2dF content_offset_; // in CSS pixel. | 217 gfx::Vector2dF content_offset_; // in CSS pixel. |
209 std::unique_ptr<EventForwarder> event_forwarder_; | 218 std::unique_ptr<EventForwarder> event_forwarder_; |
210 | 219 |
211 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); | 220 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); |
212 }; | 221 }; |
213 | 222 |
214 } // namespace ui | 223 } // namespace ui |
215 | 224 |
216 #endif // UI_ANDROID_VIEW_ANDROID_H_ | 225 #endif // UI_ANDROID_VIEW_ANDROID_H_ |
OLD | NEW |