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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
7 | 7 |
8 #if defined(OS_MACOSX) | 8 #if defined(OS_MACOSX) |
9 #include <OpenGL/OpenGL.h> | 9 #include <OpenGL/OpenGL.h> |
10 #endif | 10 #endif |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 // Create a BrowserAccessibilityManager for this view. | 153 // Create a BrowserAccessibilityManager for this view. |
154 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager( | 154 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager( |
155 BrowserAccessibilityDelegate* delegate); | 155 BrowserAccessibilityDelegate* delegate); |
156 | 156 |
157 virtual void AccessibilityShowMenu(const gfx::Point& point); | 157 virtual void AccessibilityShowMenu(const gfx::Point& point); |
158 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds); | 158 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds); |
159 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget(); | 159 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget(); |
160 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible(); | 160 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible(); |
161 | 161 |
162 virtual SkColorType PreferredReadbackFormat(); | |
163 | |
164 // Informs that the focused DOM node has changed. | 162 // Informs that the focused DOM node has changed. |
165 virtual void FocusedNodeChanged(bool is_editable_node) {} | 163 virtual void FocusedNodeChanged(bool is_editable_node) {} |
166 | 164 |
167 virtual void OnSwapCompositorFrame(uint32 output_surface_id, | 165 virtual void OnSwapCompositorFrame(uint32 output_surface_id, |
168 scoped_ptr<cc::CompositorFrame> frame) {} | 166 scoped_ptr<cc::CompositorFrame> frame) {} |
169 | 167 |
170 // Because the associated remote WebKit instance can asynchronously | 168 // Because the associated remote WebKit instance can asynchronously |
171 // prevent-default on a dispatched touch event, the touch events are queued in | 169 // prevent-default on a dispatched touch event, the touch events are queued in |
172 // the GestureRecognizer until invocation of ProcessAckedTouchEvent releases | 170 // the GestureRecognizer until invocation of ProcessAckedTouchEvent releases |
173 // it to be consumed (when |ack_result| is NOT_CONSUMED OR NO_CONSUMER_EXISTS) | 171 // it to be consumed (when |ack_result| is NOT_CONSUMED OR NO_CONSUMER_EXISTS) |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 246 |
249 // Copies the contents of the compositing surface, providing a new SkBitmap | 247 // Copies the contents of the compositing surface, providing a new SkBitmap |
250 // result via an asynchronously-run |callback|. |src_subrect| is specified in | 248 // result via an asynchronously-run |callback|. |src_subrect| is specified in |
251 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, | 249 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, |
252 // physical for Android), and is the region to be copied from this view. When | 250 // physical for Android), and is the region to be copied from this view. When |
253 // |src_subrect| is empty then the whole surface will be copied. The copy is | 251 // |src_subrect| is empty then the whole surface will be copied. The copy is |
254 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then | 252 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then |
255 // output will be unscaled. |callback| is run with true on success, | 253 // output will be unscaled. |callback| is run with true on success, |
256 // false otherwise. A smaller region than |src_subrect| may be copied | 254 // false otherwise. A smaller region than |src_subrect| may be copied |
257 // if the underlying surface is smaller than |src_subrect|. | 255 // if the underlying surface is smaller than |src_subrect|. |
258 virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect, | 256 virtual void CopyFromCompositingSurface( |
259 const gfx::Size& dst_size, | 257 const gfx::Rect& src_subrect, |
260 ReadbackRequestCallback& callback, | 258 const gfx::Size& dst_size, |
261 const SkColorType color_type) = 0; | 259 ReadbackRequestCallback& callback, |
| 260 const SkColorType preferred_color_type) = 0; |
262 | 261 |
263 // Copies the contents of the compositing surface, populating the given | 262 // Copies the contents of the compositing surface, populating the given |
264 // |target| with YV12 image data. |src_subrect| is specified in layer space | 263 // |target| with YV12 image data. |src_subrect| is specified in layer space |
265 // coordinates for the current platform (e.g., DIP for Aura/Mac, physical for | 264 // coordinates for the current platform (e.g., DIP for Aura/Mac, physical for |
266 // Android), and is the region to be copied from this view. The copy is then | 265 // Android), and is the region to be copied from this view. The copy is then |
267 // scaled and letterboxed with black borders to fit |target|. Finally, | 266 // scaled and letterboxed with black borders to fit |target|. Finally, |
268 // |callback| is asynchronously run with true/false for | 267 // |callback| is asynchronously run with true/false for |
269 // success/failure. |target| must point to an allocated, YV12 video frame of | 268 // success/failure. |target| must point to an allocated, YV12 video frame of |
270 // the intended size. This operation will fail if there is no available | 269 // the intended size. This operation will fail if there is no available |
271 // compositing surface. | 270 // compositing surface. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 419 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
421 | 420 |
422 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 421 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
423 | 422 |
424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 423 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
425 }; | 424 }; |
426 | 425 |
427 } // namespace content | 426 } // namespace content |
428 | 427 |
429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 428 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
OLD | NEW |