| 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_array.h" | 10 #include "base/android/jni_array.h" |
| 11 #include "base/android/jni_weak_ref.h" | 11 #include "base/android/jni_weak_ref.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "ui/android/ui_android_export.h" | 14 #include "ui/android/ui_android_export.h" |
| 15 #include "ui/gfx/geometry/rect_f.h" | 15 #include "ui/gfx/geometry/rect_f.h" |
| 16 | 16 |
| 17 class SkBitmap; |
| 18 |
| 17 namespace cc { | 19 namespace cc { |
| 18 class Layer; | 20 class Layer; |
| 19 } | 21 } |
| 20 | 22 |
| 23 namespace gfx { |
| 24 class Point; |
| 25 } |
| 26 |
| 21 namespace ui { | 27 namespace ui { |
| 22 class DragEventAndroid; | 28 class DragEventAndroid; |
| 23 class EventForwarder; | 29 class EventForwarder; |
| 24 class MotionEventAndroid; | 30 class MotionEventAndroid; |
| 25 class ViewClient; | 31 class ViewClient; |
| 26 class WindowAndroid; | 32 class WindowAndroid; |
| 27 | 33 |
| 28 // View-related parameters from frame updates. | 34 // View-related parameters from frame updates. |
| 29 struct FrameInfo { | 35 struct FrameInfo { |
| 30 gfx::SizeF viewport_size; // In CSS pixels. | 36 gfx::SizeF viewport_size; // In CSS pixels. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void RequestFocus(); | 145 void RequestFocus(); |
| 140 | 146 |
| 141 // Sets the layout relative to parent. Used to do hit testing against events. | 147 // Sets the layout relative to parent. Used to do hit testing against events. |
| 142 void SetLayout(LayoutParams params); | 148 void SetLayout(LayoutParams params); |
| 143 | 149 |
| 144 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, | 150 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, |
| 145 const base::android::JavaRef<jobject>& jimage); | 151 const base::android::JavaRef<jobject>& jimage); |
| 146 | 152 |
| 147 gfx::Size GetPhysicalBackingSize(); | 153 gfx::Size GetPhysicalBackingSize(); |
| 148 void OnPhysicalBackingSizeChanged(const gfx::Size& size); | 154 void OnPhysicalBackingSizeChanged(const gfx::Size& size); |
| 155 void OnCursorChanged(int type, |
| 156 const SkBitmap& custom_image, |
| 157 const gfx::Point& hotspot); |
| 149 void OnBackgroundColorChanged(unsigned int color); | 158 void OnBackgroundColorChanged(unsigned int color); |
| 150 void OnTopControlsChanged(float top_controls_offset, | 159 void OnTopControlsChanged(float top_controls_offset, |
| 151 float top_content_offset); | 160 float top_content_offset); |
| 152 void OnBottomControlsChanged(float bottom_controls_offset, | 161 void OnBottomControlsChanged(float bottom_controls_offset, |
| 153 float bottom_content_offset); | 162 float bottom_content_offset); |
| 154 int GetSystemWindowInsetBottom(); | 163 int GetSystemWindowInsetBottom(); |
| 155 | 164 |
| 156 ScopedAnchorView AcquireAnchorView(); | 165 ScopedAnchorView AcquireAnchorView(); |
| 157 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, | 166 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, |
| 158 const gfx::RectF& bounds); | 167 const gfx::RectF& bounds); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 FrameInfo frame_info_; | 242 FrameInfo frame_info_; |
| 234 | 243 |
| 235 std::unique_ptr<EventForwarder> event_forwarder_; | 244 std::unique_ptr<EventForwarder> event_forwarder_; |
| 236 | 245 |
| 237 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); | 246 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); |
| 238 }; | 247 }; |
| 239 | 248 |
| 240 } // namespace ui | 249 } // namespace ui |
| 241 | 250 |
| 242 #endif // UI_ANDROID_VIEW_ANDROID_H_ | 251 #endif // UI_ANDROID_VIEW_ANDROID_H_ |
| OLD | NEW |