| 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/keyboard_listener.h" | 10 #include "content/public/browser/keyboard_listener.h" |
| 11 #include "content/public/browser/native_web_keyboard_event.h" | 11 #include "content/public/browser/native_web_keyboard_event.h" |
| 12 #include "content/public/common/accessibility_mode.h" |
| 12 #include "ipc/ipc_channel.h" | 13 #include "ipc/ipc_channel.h" |
| 13 #include "ipc/ipc_sender.h" | 14 #include "ipc/ipc_sender.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
| 16 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
| 17 #include "ui/surface/transport_dib.h" | 18 #include "ui/surface/transport_dib.h" |
| 18 | 19 |
| 19 #if defined(TOOLKIT_GTK) | 20 #if defined(TOOLKIT_GTK) |
| 20 #include "ui/base/x/x11_util.h" | 21 #include "ui/base/x/x11_util.h" |
| 21 #elif defined(OS_MACOSX) | 22 #elif defined(OS_MACOSX) |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 #if defined(TOOLKIT_GTK) | 194 #if defined(TOOLKIT_GTK) |
| 194 // Paint the backing store into the target's |dest_rect|. | 195 // Paint the backing store into the target's |dest_rect|. |
| 195 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, | 196 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, |
| 196 GdkWindow* target) = 0; | 197 GdkWindow* target) = 0; |
| 197 #elif defined(OS_MACOSX) | 198 #elif defined(OS_MACOSX) |
| 198 virtual gfx::Size GetBackingStoreSize() = 0; | 199 virtual gfx::Size GetBackingStoreSize() = 0; |
| 199 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, | 200 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, |
| 200 CGContextRef target) = 0; | 201 CGContextRef target) = 0; |
| 201 #endif | 202 #endif |
| 202 | 203 |
| 203 // Send a command to the renderer to turn on full accessibility. | |
| 204 virtual void EnableFullAccessibilityMode() = 0; | 204 virtual void EnableFullAccessibilityMode() = 0; |
| 205 virtual AccessibilityMode GetAccessibilityMode() const = 0; |
| 206 virtual void SetAccessibilityMode(AccessibilityMode mode) = 0; |
| 205 | 207 |
| 206 // Forwards the given message to the renderer. These are called by | 208 // Forwards the given message to the renderer. These are called by |
| 207 // the view when it has received a message. | 209 // the view when it has received a message. |
| 208 virtual void ForwardMouseEvent( | 210 virtual void ForwardMouseEvent( |
| 209 const WebKit::WebMouseEvent& mouse_event) = 0; | 211 const WebKit::WebMouseEvent& mouse_event) = 0; |
| 210 virtual void ForwardWheelEvent( | 212 virtual void ForwardWheelEvent( |
| 211 const WebKit::WebMouseWheelEvent& wheel_event) = 0; | 213 const WebKit::WebMouseWheelEvent& wheel_event) = 0; |
| 212 virtual void ForwardKeyboardEvent( | 214 virtual void ForwardKeyboardEvent( |
| 213 const NativeWebKeyboardEvent& key_event) = 0; | 215 const NativeWebKeyboardEvent& key_event) = 0; |
| 214 | 216 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // within content/. This method is necessary because | 293 // within content/. This method is necessary because |
| 292 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 294 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 293 // subclasses inherit it virtually, which removes our ability to | 295 // subclasses inherit it virtually, which removes our ability to |
| 294 // static_cast to the subclass. | 296 // static_cast to the subclass. |
| 295 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 297 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 296 }; | 298 }; |
| 297 | 299 |
| 298 } // namespace content | 300 } // namespace content |
| 299 | 301 |
| 300 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 302 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |