OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 const gfx::Size& accelerated_dst_size, | 182 const gfx::Size& accelerated_dst_size, |
183 const base::Callback<void(bool, const SkBitmap&)>& callback, | 183 const base::Callback<void(bool, const SkBitmap&)>& callback, |
184 const SkColorType color_type) = 0; | 184 const SkColorType color_type) = 0; |
185 // Ensures that the view does not drop the backing store even when hidden. | 185 // Ensures that the view does not drop the backing store even when hidden. |
186 virtual bool CanCopyFromBackingStore() = 0; | 186 virtual bool CanCopyFromBackingStore() = 0; |
187 #if defined(OS_ANDROID) | 187 #if defined(OS_ANDROID) |
188 virtual void LockBackingStore() = 0; | 188 virtual void LockBackingStore() = 0; |
189 virtual void UnlockBackingStore() = 0; | 189 virtual void UnlockBackingStore() = 0; |
190 #endif | 190 #endif |
191 | 191 |
| 192 // Send a command to the renderer to turn on full accessibility. |
| 193 virtual void EnableFullAccessibilityMode() = 0; |
| 194 |
| 195 // Check whether this RenderWidget has full accessibility mode. |
| 196 virtual bool IsFullAccessibilityModeForTesting() = 0; |
| 197 |
| 198 // Send a command to the renderer to turn on tree only accessibility. |
| 199 virtual void EnableTreeOnlyAccessibilityMode() = 0; |
| 200 |
| 201 // Check whether this RenderWidget has tree-only accessibility mode. |
| 202 virtual bool IsTreeOnlyAccessibilityModeForTesting() = 0; |
| 203 |
| 204 // Relay a request from assistive technology to perform the default action |
| 205 // on a given node. |
| 206 virtual void AccessibilityDoDefaultAction(int object_id) = 0; |
| 207 |
| 208 // Relay a request from assistive technology to set focus to a given node. |
| 209 virtual void AccessibilitySetFocus(int object_id) = 0; |
| 210 |
| 211 // Relay a request from assistive technology to make a given object |
| 212 // visible by scrolling as many scrollable containers as necessary. |
| 213 // In addition, if it's not possible to make the entire object visible, |
| 214 // scroll so that the |subfocus| rect is visible at least. The subfocus |
| 215 // rect is in local coordinates of the object itself. |
| 216 virtual void AccessibilityScrollToMakeVisible( |
| 217 int acc_obj_id, gfx::Rect subfocus) = 0; |
| 218 |
| 219 // Relay a request from assistive technology to move a given object |
| 220 // to a specific location, in the WebContents area coordinate space, i.e. |
| 221 // (0, 0) is the top-left corner of the WebContents. |
| 222 virtual void AccessibilityScrollToPoint(int acc_obj_id, gfx::Point point) = 0; |
| 223 |
| 224 // Relay a request from assistive technology to set text selection. |
| 225 virtual void AccessibilitySetTextSelection( |
| 226 int acc_obj_id, int start_offset, int end_offset) = 0; |
| 227 |
192 // Forwards the given message to the renderer. These are called by | 228 // Forwards the given message to the renderer. These are called by |
193 // the view when it has received a message. | 229 // the view when it has received a message. |
194 virtual void ForwardMouseEvent( | 230 virtual void ForwardMouseEvent( |
195 const blink::WebMouseEvent& mouse_event) = 0; | 231 const blink::WebMouseEvent& mouse_event) = 0; |
196 virtual void ForwardWheelEvent( | 232 virtual void ForwardWheelEvent( |
197 const blink::WebMouseWheelEvent& wheel_event) = 0; | 233 const blink::WebMouseWheelEvent& wheel_event) = 0; |
198 virtual void ForwardKeyboardEvent( | 234 virtual void ForwardKeyboardEvent( |
199 const NativeWebKeyboardEvent& key_event) = 0; | 235 const NativeWebKeyboardEvent& key_event) = 0; |
200 | 236 |
201 virtual const gfx::Vector2d& GetLastScrollOffset() const = 0; | 237 virtual const gfx::Vector2d& GetLastScrollOffset() const = 0; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // within content/. This method is necessary because | 299 // within content/. This method is necessary because |
264 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 300 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
265 // subclasses inherit it virtually, which removes our ability to | 301 // subclasses inherit it virtually, which removes our ability to |
266 // static_cast to the subclass. | 302 // static_cast to the subclass. |
267 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 303 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
268 }; | 304 }; |
269 | 305 |
270 } // namespace content | 306 } // namespace content |
271 | 307 |
272 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 308 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |