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> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
17 #include "base/callback.h" | 17 #include "base/callback.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
20 #include "third_party/skia/include/core/SkColor.h" | 20 #include "third_party/skia/include/core/SkColor.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
23 #include "ui/base/ime/text_input_type.h" | 23 #include "ui/base/ime/text_input_type.h" |
24 #include "ui/base/range/range.h" | 24 #include "ui/base/range/range.h" |
25 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
26 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
27 #include "ui/gfx/surface/transport_dib.h" | 27 #include "ui/gfx/surface/transport_dib.h" |
28 | 28 |
29 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | |
30 | |
29 namespace gfx { | 31 namespace gfx { |
30 class Rect; | 32 class Rect; |
31 class Size; | 33 class Size; |
32 } | 34 } |
33 namespace IPC { | 35 namespace IPC { |
34 class Message; | 36 class Message; |
35 } | 37 } |
36 | 38 |
37 class BackingStore; | 39 class BackingStore; |
38 class RenderProcessHost; | 40 class RenderProcessHost; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, | 184 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, |
183 const gfx::Rect& end_rect) {} | 185 const gfx::Rect& end_rect) {} |
184 | 186 |
185 // Tells the View whether the context menu is showing. This is used on Linux | 187 // Tells the View whether the context menu is showing. This is used on Linux |
186 // to suppress updates to webkit focus for the duration of the show. | 188 // to suppress updates to webkit focus for the duration of the show. |
187 virtual void ShowingContextMenu(bool showing) {} | 189 virtual void ShowingContextMenu(bool showing) {} |
188 | 190 |
189 // Allocate a backing store for this view | 191 // Allocate a backing store for this view |
190 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 192 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
191 | 193 |
194 // |window| and |surface_id| indicate which accelerated surface's | |
195 // buffers swapped. |renderer_id| and |route_id| are used to formulate | |
196 // a reply to the GPU process to prevent it from getting too far ahead. | |
197 // They may all be zero, in which case no flow control is enforced; | |
198 // this case is currently used for accelerated plugins. | |
jonathan.backer
2011/11/03 23:09:07
nix the comment?
| |
199 virtual void AcceleratedSurfaceBuffersSwapped( | |
200 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | |
201 int gpu_host_id) = 0; | |
202 | |
192 #if defined(OS_MACOSX) | 203 #if defined(OS_MACOSX) |
193 // Tells the view whether or not to accept first responder status. If |flag| | 204 // Tells the view whether or not to accept first responder status. If |flag| |
194 // is true, the view does not accept first responder status and instead | 205 // is true, the view does not accept first responder status and instead |
195 // manually becomes first responder when it receives a mouse down event. If | 206 // manually becomes first responder when it receives a mouse down event. If |
196 // |flag| is false, the view participates in the key-view chain as normal. | 207 // |flag| is false, the view participates in the key-view chain as normal. |
197 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; | 208 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; |
198 | 209 |
199 // Retrieve the bounds of the view, in cocoa view coordinates. | 210 // Retrieve the bounds of the view, in cocoa view coordinates. |
200 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. | 211 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. |
201 // (400, 300) in pixels, while this method will return (200, 150). | 212 // (400, 300) in pixels, while this method will return (200, 150). |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 virtual void AcceleratedSurfaceSetIOSurface( | 248 virtual void AcceleratedSurfaceSetIOSurface( |
238 gfx::PluginWindowHandle window, | 249 gfx::PluginWindowHandle window, |
239 int32 width, | 250 int32 width, |
240 int32 height, | 251 int32 height, |
241 uint64 io_surface_identifier) = 0; | 252 uint64 io_surface_identifier) = 0; |
242 virtual void AcceleratedSurfaceSetTransportDIB( | 253 virtual void AcceleratedSurfaceSetTransportDIB( |
243 gfx::PluginWindowHandle window, | 254 gfx::PluginWindowHandle window, |
244 int32 width, | 255 int32 width, |
245 int32 height, | 256 int32 height, |
246 TransportDIB::Handle transport_dib) = 0; | 257 TransportDIB::Handle transport_dib) = 0; |
247 // |window| and |surface_id| indicate which accelerated surface's | |
248 // buffers swapped. |renderer_id| and |route_id| are used to formulate | |
249 // a reply to the GPU process to prevent it from getting too far ahead. | |
250 // They may all be zero, in which case no flow control is enforced; | |
251 // this case is currently used for accelerated plugins. | |
252 virtual void AcceleratedSurfaceBuffersSwapped( | |
253 gfx::PluginWindowHandle window, | |
254 uint64 surface_id, | |
255 int renderer_id, | |
256 int32 route_id, | |
257 int gpu_host_id) = 0; | |
258 virtual void GpuRenderingStateDidChange() = 0; | 258 virtual void GpuRenderingStateDidChange() = 0; |
259 #endif | 259 #endif |
260 | 260 |
261 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 261 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
262 virtual void AcceleratedSurfaceNew( | 262 virtual void AcceleratedSurfaceNew( |
263 int32 width, | 263 int32 width, |
264 int32 height, | 264 int32 height, |
265 uint64* surface_id, | 265 uint64* surface_id, |
266 TransportDIB::Handle* surface_handle) = 0; | 266 TransportDIB::Handle* surface_handle) = 0; |
267 virtual void AcceleratedSurfaceBuffersSwapped( | |
268 uint64 surface_id, | |
269 int32 route_id, | |
270 int gpu_host_id) = 0; | |
271 virtual void AcceleratedSurfaceRelease(uint64 surface_id) = 0; | 267 virtual void AcceleratedSurfaceRelease(uint64 surface_id) = 0; |
272 #endif | 268 #endif |
273 | 269 |
274 #if defined(TOOLKIT_USES_GTK) | 270 #if defined(TOOLKIT_USES_GTK) |
275 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) = 0; | 271 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) = 0; |
276 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0; | 272 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0; |
277 virtual void AcceleratedCompositingActivated(bool activated) = 0; | 273 virtual void AcceleratedCompositingActivated(bool activated) = 0; |
278 #endif | 274 #endif |
279 | 275 |
280 #if defined(OS_WIN) | 276 #if defined(OS_WIN) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 size_t selection_text_offset_; | 358 size_t selection_text_offset_; |
363 | 359 |
364 // The current selection range relative to the start of the web page. | 360 // The current selection range relative to the start of the web page. |
365 ui::Range selection_range_; | 361 ui::Range selection_range_; |
366 | 362 |
367 private: | 363 private: |
368 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 364 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
369 }; | 365 }; |
370 | 366 |
371 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 367 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |