| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 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" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 #if defined(TOOLKIT_GTK) | 183 #if defined(TOOLKIT_GTK) |
| 184 // Paint the backing store into the target's |dest_rect|. | 184 // Paint the backing store into the target's |dest_rect|. |
| 185 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, | 185 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, |
| 186 GdkWindow* target) = 0; | 186 GdkWindow* target) = 0; |
| 187 #elif defined(OS_MACOSX) | 187 #elif defined(OS_MACOSX) |
| 188 virtual gfx::Size GetBackingStoreSize() = 0; | 188 virtual gfx::Size GetBackingStoreSize() = 0; |
| 189 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, | 189 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, |
| 190 CGContextRef target) = 0; | 190 CGContextRef target) = 0; |
| 191 #endif | 191 #endif |
| 192 | 192 |
| 193 // Copies the contents of the compositing surface into the given |
| 194 // (uninitialized) PlatformCanvas if any. Returns true on success, false |
| 195 // otherwise. |
| 196 virtual bool CopyFromCompositingSurface(const gfx::Size& size, |
| 197 skia::PlatformCanvas* output) = 0; |
| 198 |
| 193 // Enable renderer accessibility. This should only be called when a | 199 // Enable renderer accessibility. This should only be called when a |
| 194 // screenreader is detected. | 200 // screenreader is detected. |
| 195 virtual void EnableRendererAccessibility() = 0; | 201 virtual void EnableRendererAccessibility() = 0; |
| 196 | 202 |
| 197 // Forwards the given message to the renderer. These are called by | 203 // Forwards the given message to the renderer. These are called by |
| 198 // the view when it has received a message. | 204 // the view when it has received a message. |
| 199 virtual void ForwardMouseEvent( | 205 virtual void ForwardMouseEvent( |
| 200 const WebKit::WebMouseEvent& mouse_event) = 0; | 206 const WebKit::WebMouseEvent& mouse_event) = 0; |
| 201 virtual void ForwardWheelEvent( | 207 virtual void ForwardWheelEvent( |
| 202 const WebKit::WebMouseWheelEvent& wheel_event) = 0; | 208 const WebKit::WebMouseWheelEvent& wheel_event) = 0; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 // within content/. This method is necessary because | 296 // within content/. This method is necessary because |
| 291 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 297 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 292 // subclasses inherit it virtually, which removes our ability to | 298 // subclasses inherit it virtually, which removes our ability to |
| 293 // static_cast to the subclass. | 299 // static_cast to the subclass. |
| 294 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 300 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 295 }; | 301 }; |
| 296 | 302 |
| 297 } // namespace content | 303 } // namespace content |
| 298 | 304 |
| 299 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 305 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |