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; | 29 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 30 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
30 | 31 |
31 class BackingStore; | 32 class BackingStore; |
32 class RenderWidgetHost; | 33 class RenderWidgetHost; |
33 class WebCursor; | 34 class WebCursor; |
34 struct NativeWebKeyboardEvent; | 35 struct NativeWebKeyboardEvent; |
35 struct ViewHostMsg_AccessibilityNotification_Params; | 36 struct ViewHostMsg_AccessibilityNotification_Params; |
36 | 37 |
37 namespace content { | 38 namespace content { |
38 class RenderProcessHost; | 39 class RenderProcessHost; |
39 } | 40 } |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // Called when accelerated compositing state changes. | 191 // Called when accelerated compositing state changes. |
191 virtual void OnAcceleratedCompositingStateChange() = 0; | 192 virtual void OnAcceleratedCompositingStateChange() = 0; |
192 // |params.window| and |params.surface_id| indicate which accelerated | 193 // |params.window| and |params.surface_id| indicate which accelerated |
193 // surface's buffers swapped. |params.renderer_id| and |params.route_id| | 194 // surface's buffers swapped. |params.renderer_id| and |params.route_id| |
194 // are used to formulate a reply to the GPU process to prevent it from getting | 195 // are used to formulate a reply to the GPU process to prevent it from getting |
195 // too far ahead. They may all be zero, in which case no flow control is | 196 // too far ahead. They may all be zero, in which case no flow control is |
196 // enforced; this case is currently used for accelerated plugins. | 197 // enforced; this case is currently used for accelerated plugins. |
197 virtual void AcceleratedSurfaceBuffersSwapped( | 198 virtual void AcceleratedSurfaceBuffersSwapped( |
198 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | 199 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
199 int gpu_host_id) = 0; | 200 int gpu_host_id) = 0; |
| 201 // Similar to above, except |params.(x|y|width|height)| define the region |
| 202 // of the surface that changed. |
| 203 virtual void AcceleratedSurfacePostSubBuffer( |
| 204 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| 205 int gpu_host_id) = 0; |
200 | 206 |
201 #if defined(OS_MACOSX) | 207 #if defined(OS_MACOSX) |
202 // Tells the view whether or not to accept first responder status. If |flag| | 208 // Tells the view whether or not to accept first responder status. If |flag| |
203 // is true, the view does not accept first responder status and instead | 209 // is true, the view does not accept first responder status and instead |
204 // manually becomes first responder when it receives a mouse down event. If | 210 // manually becomes first responder when it receives a mouse down event. If |
205 // |flag| is false, the view participates in the key-view chain as normal. | 211 // |flag| is false, the view participates in the key-view chain as normal. |
206 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; | 212 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; |
207 | 213 |
208 // Retrieve the bounds of the view, in cocoa view coordinates. | 214 // Retrieve the bounds of the view, in cocoa view coordinates. |
209 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. | 215 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 size_t selection_text_offset_; | 360 size_t selection_text_offset_; |
355 | 361 |
356 // The current selection range relative to the start of the web page. | 362 // The current selection range relative to the start of the web page. |
357 ui::Range selection_range_; | 363 ui::Range selection_range_; |
358 | 364 |
359 private: | 365 private: |
360 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 366 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
361 }; | 367 }; |
362 | 368 |
363 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 369 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |