| 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 class BackingStore; | 31 class BackingStore; |
| 30 class RenderProcessHost; | 32 class RenderProcessHost; |
| 31 class RenderWidgetHost; | 33 class RenderWidgetHost; |
| 32 class WebCursor; | 34 class WebCursor; |
| 33 struct NativeWebKeyboardEvent; | 35 struct NativeWebKeyboardEvent; |
| 34 struct ViewHostMsg_AccessibilityNotification_Params; | 36 struct ViewHostMsg_AccessibilityNotification_Params; |
| 35 | 37 |
| 36 namespace gfx { | 38 namespace gfx { |
| 37 class Rect; | 39 class Rect; |
| 38 class Size; | 40 class Size; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 179 |
| 178 // Tells the View whether the context menu is showing. This is used on Linux | 180 // Tells the View whether the context menu is showing. This is used on Linux |
| 179 // to suppress updates to webkit focus for the duration of the show. | 181 // to suppress updates to webkit focus for the duration of the show. |
| 180 virtual void ShowingContextMenu(bool showing) {} | 182 virtual void ShowingContextMenu(bool showing) {} |
| 181 | 183 |
| 182 // Allocate a backing store for this view | 184 // Allocate a backing store for this view |
| 183 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 185 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
| 184 | 186 |
| 185 // Called when accelerated compositing state changes. | 187 // Called when accelerated compositing state changes. |
| 186 virtual void OnAcceleratedCompositingStateChange() = 0; | 188 virtual void OnAcceleratedCompositingStateChange() = 0; |
| 189 // |params.window| and |params.surface_id| indicate which accelerated |
| 190 // surface's buffers swapped. |params.renderer_id| and |params.route_id| |
| 191 // are used to formulate a reply to the GPU process to prevent it from getting |
| 192 // too far ahead. They may all be zero, in which case no flow control is |
| 193 // enforced; this case is currently used for accelerated plugins. |
| 194 virtual void AcceleratedSurfaceBuffersSwapped( |
| 195 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
| 196 int gpu_host_id) = 0; |
| 187 | 197 |
| 188 #if defined(OS_MACOSX) | 198 #if defined(OS_MACOSX) |
| 189 // Tells the view whether or not to accept first responder status. If |flag| | 199 // Tells the view whether or not to accept first responder status. If |flag| |
| 190 // is true, the view does not accept first responder status and instead | 200 // is true, the view does not accept first responder status and instead |
| 191 // manually becomes first responder when it receives a mouse down event. If | 201 // manually becomes first responder when it receives a mouse down event. If |
| 192 // |flag| is false, the view participates in the key-view chain as normal. | 202 // |flag| is false, the view participates in the key-view chain as normal. |
| 193 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; | 203 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; |
| 194 | 204 |
| 195 // Retrieve the bounds of the view, in cocoa view coordinates. | 205 // Retrieve the bounds of the view, in cocoa view coordinates. |
| 196 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. | 206 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 virtual void AcceleratedSurfaceSetIOSurface( | 243 virtual void AcceleratedSurfaceSetIOSurface( |
| 234 gfx::PluginWindowHandle window, | 244 gfx::PluginWindowHandle window, |
| 235 int32 width, | 245 int32 width, |
| 236 int32 height, | 246 int32 height, |
| 237 uint64 io_surface_identifier) = 0; | 247 uint64 io_surface_identifier) = 0; |
| 238 virtual void AcceleratedSurfaceSetTransportDIB( | 248 virtual void AcceleratedSurfaceSetTransportDIB( |
| 239 gfx::PluginWindowHandle window, | 249 gfx::PluginWindowHandle window, |
| 240 int32 width, | 250 int32 width, |
| 241 int32 height, | 251 int32 height, |
| 242 TransportDIB::Handle transport_dib) = 0; | 252 TransportDIB::Handle transport_dib) = 0; |
| 243 // |window| and |surface_id| indicate which accelerated surface's | |
| 244 // buffers swapped. |renderer_id| and |route_id| are used to formulate | |
| 245 // a reply to the GPU process to prevent it from getting too far ahead. | |
| 246 // They may all be zero, in which case no flow control is enforced; | |
| 247 // this case is currently used for accelerated plugins. | |
| 248 virtual void AcceleratedSurfaceBuffersSwapped( | |
| 249 gfx::PluginWindowHandle window, | |
| 250 uint64 surface_id, | |
| 251 int renderer_id, | |
| 252 int32 route_id, | |
| 253 int gpu_host_id) = 0; | |
| 254 #endif | 253 #endif |
| 255 | 254 |
| 256 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 255 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 257 virtual void AcceleratedSurfaceNew( | 256 virtual void AcceleratedSurfaceNew( |
| 258 int32 width, | 257 int32 width, |
| 259 int32 height, | 258 int32 height, |
| 260 uint64* surface_id, | 259 uint64* surface_id, |
| 261 TransportDIB::Handle* surface_handle) = 0; | 260 TransportDIB::Handle* surface_handle) = 0; |
| 262 virtual void AcceleratedSurfaceBuffersSwapped( | |
| 263 uint64 surface_id, | |
| 264 int32 route_id, | |
| 265 int gpu_host_id) = 0; | |
| 266 virtual void AcceleratedSurfaceRelease(uint64 surface_id) = 0; | 261 virtual void AcceleratedSurfaceRelease(uint64 surface_id) = 0; |
| 267 #endif | 262 #endif |
| 268 | 263 |
| 269 #if defined(TOOLKIT_USES_GTK) | 264 #if defined(TOOLKIT_USES_GTK) |
| 270 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) = 0; | 265 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) = 0; |
| 271 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0; | 266 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0; |
| 272 #endif | 267 #endif |
| 273 | 268 |
| 274 #if defined(OS_WIN) && !defined(USE_AURA) | 269 #if defined(OS_WIN) && !defined(USE_AURA) |
| 275 virtual void WillWmDestroy() = 0; | 270 virtual void WillWmDestroy() = 0; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 size_t selection_text_offset_; | 351 size_t selection_text_offset_; |
| 357 | 352 |
| 358 // The current selection range relative to the start of the web page. | 353 // The current selection range relative to the start of the web page. |
| 359 ui::Range selection_range_; | 354 ui::Range selection_range_; |
| 360 | 355 |
| 361 private: | 356 private: |
| 362 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 357 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
| 363 }; | 358 }; |
| 364 | 359 |
| 365 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 360 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |