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