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 18 matching lines...) Expand all Loading... |
29 #include "ui/base/ime/text_input_type.h" | 29 #include "ui/base/ime/text_input_type.h" |
30 #include "ui/gfx/display.h" | 30 #include "ui/gfx/display.h" |
31 #include "ui/gfx/native_widget_types.h" | 31 #include "ui/gfx/native_widget_types.h" |
32 #include "ui/gfx/range/range.h" | 32 #include "ui/gfx/range/range.h" |
33 #include "ui/gfx/rect.h" | 33 #include "ui/gfx/rect.h" |
34 #include "ui/surface/transport_dib.h" | 34 #include "ui/surface/transport_dib.h" |
35 | 35 |
36 class SkBitmap; | 36 class SkBitmap; |
37 | 37 |
38 struct AccessibilityHostMsg_EventParams; | 38 struct AccessibilityHostMsg_EventParams; |
39 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | |
40 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | |
41 struct ViewHostMsg_SelectionBounds_Params; | 39 struct ViewHostMsg_SelectionBounds_Params; |
42 struct ViewHostMsg_TextInputState_Params; | 40 struct ViewHostMsg_TextInputState_Params; |
43 | 41 |
44 namespace media { | 42 namespace media { |
45 class VideoFrame; | 43 class VideoFrame; |
46 } | 44 } |
47 | 45 |
48 namespace blink { | 46 namespace blink { |
49 struct WebScreenInfo; | 47 struct WebScreenInfo; |
50 } | 48 } |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 const base::Callback<void(bool)>& callback) = 0; | 280 const base::Callback<void(bool)>& callback) = 0; |
283 | 281 |
284 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to | 282 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to |
285 // succeed. | 283 // succeed. |
286 // | 284 // |
287 // TODO(nick): When VideoFrame copies are broadly implemented, this method | 285 // TODO(nick): When VideoFrame copies are broadly implemented, this method |
288 // should be renamed to HasCompositingSurface(), or unified with | 286 // should be renamed to HasCompositingSurface(), or unified with |
289 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). | 287 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). |
290 virtual bool CanCopyToVideoFrame() const = 0; | 288 virtual bool CanCopyToVideoFrame() const = 0; |
291 | 289 |
292 // Called when an accelerated compositing surface is initialized. | 290 // DEPRECATED. Called when an accelerated compositing surface is initialized. |
293 virtual void AcceleratedSurfaceInitialized(int host_id, int route_id) = 0; | 291 virtual void AcceleratedSurfaceInitialized(int route_id) {} |
294 // |params.window| and |params.surface_id| indicate which accelerated | |
295 // surface's buffers swapped. |params.renderer_id| and |params.route_id| | |
296 // are used to formulate a reply to the GPU process to prevent it from getting | |
297 // too far ahead. They may all be zero, in which case no flow control is | |
298 // enforced; this case is currently used for accelerated plugins. | |
299 virtual void AcceleratedSurfaceBuffersSwapped( | |
300 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, | |
301 int gpu_host_id) = 0; | |
302 // Similar to above, except |params.(x|y|width|height)| define the region | |
303 // of the surface that changed. | |
304 virtual void AcceleratedSurfacePostSubBuffer( | |
305 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, | |
306 int gpu_host_id) = 0; | |
307 | |
308 // Release the accelerated surface temporarily. It will be recreated on the | |
309 // next swap buffers or post sub buffer. | |
310 virtual void AcceleratedSurfaceSuspend() = 0; | |
311 | |
312 virtual void AcceleratedSurfaceRelease() = 0; | |
313 | 292 |
314 // Return true if the view has an accelerated surface that contains the last | 293 // Return true if the view has an accelerated surface that contains the last |
315 // presented frame for the view. If |desired_size| is non-empty, true is | 294 // presented frame for the view. If |desired_size| is non-empty, true is |
316 // returned only if the accelerated surface size matches. | 295 // returned only if the accelerated surface size matches. |
317 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; | 296 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; |
318 | 297 |
319 // Compute the orientation type of the display assuming it is a mobile device. | 298 // Compute the orientation type of the display assuming it is a mobile device. |
320 static blink::WebScreenOrientationType GetOrientationTypeForMobile( | 299 static blink::WebScreenOrientationType GetOrientationTypeForMobile( |
321 const gfx::Display& display); | 300 const gfx::Display& display); |
322 | 301 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 421 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
443 | 422 |
444 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 423 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
445 | 424 |
446 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 425 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
447 }; | 426 }; |
448 | 427 |
449 } // namespace content | 428 } // namespace content |
450 | 429 |
451 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 430 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
OLD | NEW |