OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
10 #include <OpenGL/OpenGL.h> | 10 #include <OpenGL/OpenGL.h> |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // not enabled, this is a no-op, so it is always safe to call. | 237 // not enabled, this is a no-op, so it is always safe to call. |
238 // Returns true if the event was handled by IME. | 238 // Returns true if the event was handled by IME. |
239 virtual bool PostProcessEventForPluginIme( | 239 virtual bool PostProcessEventForPluginIme( |
240 const NativeWebKeyboardEvent& event) = 0; | 240 const NativeWebKeyboardEvent& event) = 0; |
241 | 241 |
242 // Methods associated with GPU-accelerated plug-in instances. | 242 // Methods associated with GPU-accelerated plug-in instances. |
243 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle( | 243 virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle( |
244 bool opaque, bool root) = 0; | 244 bool opaque, bool root) = 0; |
245 virtual void DestroyFakePluginWindowHandle( | 245 virtual void DestroyFakePluginWindowHandle( |
246 gfx::PluginWindowHandle window) = 0; | 246 gfx::PluginWindowHandle window) = 0; |
247 virtual void AcceleratedSurfaceSetIOSurface( | 247 // Gives a new surface to be used. |
| 248 virtual void AcceleratedSurfaceNew( |
248 gfx::PluginWindowHandle window, | 249 gfx::PluginWindowHandle window, |
249 int32 width, | 250 int32 width, |
250 int32 height, | 251 int32 height, |
251 uint64 io_surface_identifier) = 0; | 252 uint64 io_surface_identifier) = 0; |
252 virtual void AcceleratedSurfaceSetTransportDIB( | 253 virtual void AcceleratedSurfaceSetTransportDIB( |
253 gfx::PluginWindowHandle window, | 254 gfx::PluginWindowHandle window, |
254 int32 width, | 255 int32 width, |
255 int32 height, | 256 int32 height, |
256 TransportDIB::Handle transport_dib) = 0; | 257 TransportDIB::Handle transport_dib) = 0; |
257 // |window| and |surface_id| indicate which accelerated surface's | 258 // |window| and |surface_id| indicate which accelerated surface's |
258 // buffers swapped. |renderer_id|, |route_id| and | 259 // buffers swapped. |renderer_id|, |route_id| and |
259 // |swap_buffers_count| are used to formulate a reply to the GPU | 260 // |swap_buffers_count| are used to formulate a reply to the GPU |
260 // process to prevent it from getting too far ahead. They may all be | 261 // process to prevent it from getting too far ahead. They may all be |
261 // zero, in which case no flow control is enforced; this case is | 262 // zero, in which case no flow control is enforced; this case is |
262 // currently used for accelerated plugins. | 263 // currently used for accelerated plugins. |
263 virtual void AcceleratedSurfaceBuffersSwapped( | 264 virtual void AcceleratedSurfaceBuffersSwapped( |
264 gfx::PluginWindowHandle window, | 265 gfx::PluginWindowHandle window, |
265 uint64 surface_id, | 266 uint64 surface_id, |
266 int renderer_id, | 267 int renderer_id, |
267 int32 route_id, | 268 int32 route_id, |
268 int gpu_host_id, | 269 int gpu_host_id, |
269 uint64 swap_buffers_count) = 0; | 270 uint64 swap_buffers_count) = 0; |
270 virtual void GpuRenderingStateDidChange() = 0; | 271 virtual void GpuRenderingStateDidChange() = 0; |
271 #endif | 272 #endif |
272 | 273 |
273 #if defined(TOUCH_UI) | 274 #if defined(TOUCH_UI) |
274 virtual void AcceleratedSurfaceSetIOSurface( | 275 // Begin using a new AcceleratedSurface in the browser's view host. |
275 int32 width, int32 height, uint64 surface_id) = 0; | 276 // This may create a new internal surface or simply switch to using a new |
| 277 // surface_id, depending on the implementation. |
| 278 virtual void AcceleratedSurfaceNew( |
| 279 int32 width, |
| 280 int32 height, |
| 281 uint64* surface_id, |
| 282 TransportDIB::Handle *surface_handle) = 0; |
276 virtual void AcceleratedSurfaceBuffersSwapped( | 283 virtual void AcceleratedSurfaceBuffersSwapped( |
277 uint64 surface_id, | 284 uint64 surface_id, |
278 int32 route_id, | 285 int32 route_id, |
279 int gpu_host_id) = 0; | 286 int gpu_host_id) = 0; |
280 virtual void AcceleratedSurfaceRelease(uint64 surface_id) = 0; | 287 virtual void AcceleratedSurfaceRelease(uint64 surface_id) = 0; |
281 #endif | 288 #endif |
282 | 289 |
283 #if defined(TOOLKIT_USES_GTK) | 290 #if defined(TOOLKIT_USES_GTK) |
284 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) = 0; | 291 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) = 0; |
285 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0; | 292 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 355 |
349 // The current reserved area in view coordinates where contents should not be | 356 // The current reserved area in view coordinates where contents should not be |
350 // rendered to draw the resize corner, sidebar mini tabs etc. | 357 // rendered to draw the resize corner, sidebar mini tabs etc. |
351 gfx::Rect reserved_rect_; | 358 gfx::Rect reserved_rect_; |
352 | 359 |
353 private: | 360 private: |
354 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 361 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
355 }; | 362 }; |
356 | 363 |
357 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 364 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |