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 DragEventAndroid; | 27 class DragEventAndroid; |
22 class EventForwarder; | 28 class EventForwarder; |
23 class MotionEventAndroid; | 29 class MotionEventAndroid; |
24 class ViewClient; | 30 class ViewClient; |
25 class WindowAndroid; | 31 class WindowAndroid; |
26 | 32 |
27 // A simple container for a UI layer. | 33 // A simple container for a UI layer. |
28 // At the root of the hierarchy is a WindowAndroid, when attached. | 34 // At the root of the hierarchy is a WindowAndroid, when attached. |
29 // Dispatches input/view events coming from Java layer. Hit testing against | 35 // Dispatches input/view events coming from Java layer. Hit testing against |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 void RemoveFromParent(); | 136 void RemoveFromParent(); |
131 | 137 |
132 // Sets the layout relative to parent. Used to do hit testing against events. | 138 // Sets the layout relative to parent. Used to do hit testing against events. |
133 void SetLayout(LayoutParams params); | 139 void SetLayout(LayoutParams params); |
134 | 140 |
135 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, | 141 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, |
136 const base::android::JavaRef<jobject>& jimage); | 142 const base::android::JavaRef<jobject>& jimage); |
137 | 143 |
138 gfx::Size GetPhysicalBackingSize(); | 144 gfx::Size GetPhysicalBackingSize(); |
139 void OnPhysicalBackingSizeChanged(const gfx::Size& size); | 145 void OnPhysicalBackingSizeChanged(const gfx::Size& size); |
| 146 void OnCursorChanged(int type, |
| 147 const SkBitmap& custom_image, |
| 148 const gfx::Point& hotspot); |
140 void OnBackgroundColorChanged(unsigned int color); | 149 void OnBackgroundColorChanged(unsigned int color); |
141 void OnTopControlsChanged(float top_controls_offset, | 150 void OnTopControlsChanged(float top_controls_offset, |
142 float top_content_offset); | 151 float top_content_offset); |
143 void OnBottomControlsChanged(float bottom_controls_offset, | 152 void OnBottomControlsChanged(float bottom_controls_offset, |
144 float bottom_content_offset); | 153 float bottom_content_offset); |
145 int GetSystemWindowInsetBottom(); | 154 int GetSystemWindowInsetBottom(); |
146 | 155 |
147 ScopedAnchorView AcquireAnchorView(); | 156 ScopedAnchorView AcquireAnchorView(); |
148 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, | 157 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, |
149 const gfx::RectF& bounds); | 158 const gfx::RectF& bounds); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 228 |
220 gfx::Vector2dF content_offset_; // in CSS pixel. | 229 gfx::Vector2dF content_offset_; // in CSS pixel. |
221 std::unique_ptr<EventForwarder> event_forwarder_; | 230 std::unique_ptr<EventForwarder> event_forwarder_; |
222 | 231 |
223 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); | 232 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); |
224 }; | 233 }; |
225 | 234 |
226 } // namespace ui | 235 } // namespace ui |
227 | 236 |
228 #endif // UI_ANDROID_VIEW_ANDROID_H_ | 237 #endif // UI_ANDROID_VIEW_ANDROID_H_ |
OLD | NEW |