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_WIN_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlapp.h> | 10 #include <atlapp.h> |
11 #include <atlcrack.h> | 11 #include <atlcrack.h> |
12 #include <atlmisc.h> | 12 #include <atlmisc.h> |
13 | 13 |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/scoped_vector.h" | 18 #include "base/memory/scoped_vector.h" |
19 #include "base/task.h" | 19 #include "base/task.h" |
20 #include "base/time.h" | 20 #include "base/time.h" |
21 #include "base/win/scoped_comptr.h" | 21 #include "base/win/scoped_comptr.h" |
22 #include "content/browser/accessibility/browser_accessibility_manager.h" | 22 #include "content/browser/accessibility/browser_accessibility_manager.h" |
23 #include "content/browser/renderer_host/render_widget_host_view.h" | 23 #include "content/browser/renderer_host/render_widget_host_view.h" |
24 #include "content/common/content_export.h" | 24 #include "content/common/content_export.h" |
25 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
26 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
27 #include "ui/base/win/ime_input.h" | 27 #include "ui/base/win/ime_input.h" |
28 #include "ui/gfx/native_widget_types.h" | 28 #include "ui/gfx/native_widget_types.h" |
29 #include "ui/gfx/point.h" | 29 #include "ui/gfx/point.h" |
| 30 #include "ui/gfx/surface/accelerated_surface_win.h" |
30 #include "webkit/glue/webcursor.h" | 31 #include "webkit/glue/webcursor.h" |
31 | 32 |
32 class BackingStore; | 33 class BackingStore; |
33 class RenderWidgetHost; | 34 class RenderWidgetHost; |
34 | 35 |
35 namespace gfx { | 36 namespace gfx { |
36 class Size; | 37 class Size; |
37 class Rect; | 38 class Rect; |
38 } | 39 } |
39 | 40 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 virtual void SetVisuallyDeemphasized(const SkColor* color, | 174 virtual void SetVisuallyDeemphasized(const SkColor* color, |
174 bool animate) OVERRIDE; | 175 bool animate) OVERRIDE; |
175 virtual void UnhandledWheelEvent( | 176 virtual void UnhandledWheelEvent( |
176 const WebKit::WebMouseWheelEvent& event) OVERRIDE; | 177 const WebKit::WebMouseWheelEvent& event) OVERRIDE; |
177 virtual void SetHasHorizontalScrollbar( | 178 virtual void SetHasHorizontalScrollbar( |
178 bool has_horizontal_scrollbar) OVERRIDE; | 179 bool has_horizontal_scrollbar) OVERRIDE; |
179 virtual void SetScrollOffsetPinning( | 180 virtual void SetScrollOffsetPinning( |
180 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | 181 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
181 virtual gfx::PluginWindowHandle GetCompositingSurface() OVERRIDE; | 182 virtual gfx::PluginWindowHandle GetCompositingSurface() OVERRIDE; |
182 virtual void ShowCompositorHostWindow(bool show) OVERRIDE; | 183 virtual void ShowCompositorHostWindow(bool show) OVERRIDE; |
| 184 virtual void AcceleratedSurfaceBuffersSwapped( |
| 185 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
| 186 int gpu_host_id) OVERRIDE; |
183 virtual void OnAccessibilityNotifications( | 187 virtual void OnAccessibilityNotifications( |
184 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params | 188 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params |
185 ) OVERRIDE; | 189 ) OVERRIDE; |
186 virtual bool LockMouse() OVERRIDE; | 190 virtual bool LockMouse() OVERRIDE; |
187 virtual void UnlockMouse() OVERRIDE; | 191 virtual void UnlockMouse() OVERRIDE; |
188 | 192 |
189 // Implementation of content::NotificationObserver: | 193 // Implementation of content::NotificationObserver: |
190 virtual void Observe(int type, | 194 virtual void Observe(int type, |
191 const content::NotificationSource& source, | 195 const content::NotificationSource& source, |
192 const content::NotificationDetails& details) OVERRIDE; | 196 const content::NotificationDetails& details) OVERRIDE; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); | 305 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); |
302 | 306 |
303 // The associated Model. While |this| is being Destroyed, | 307 // The associated Model. While |this| is being Destroyed, |
304 // |render_widget_host_| is NULL and the Windows message loop is run one last | 308 // |render_widget_host_| is NULL and the Windows message loop is run one last |
305 // time. Message handlers must check for a NULL |render_widget_host_|. | 309 // time. Message handlers must check for a NULL |render_widget_host_|. |
306 RenderWidgetHost* render_widget_host_; | 310 RenderWidgetHost* render_widget_host_; |
307 | 311 |
308 // When we are doing accelerated compositing | 312 // When we are doing accelerated compositing |
309 HWND compositor_host_window_; | 313 HWND compositor_host_window_; |
310 | 314 |
| 315 // Presents a texture received from another process to the compositing |
| 316 // window. |
| 317 scoped_refptr<AcceleratedSurface> accelerated_surface_; |
| 318 |
311 // true if the compositor host window must be hidden after the | 319 // true if the compositor host window must be hidden after the |
312 // software renderered view is updated. | 320 // software renderered view is updated. |
313 bool hide_compositor_window_at_next_paint_; | 321 bool hide_compositor_window_at_next_paint_; |
314 | 322 |
315 // The cursor for the page. This is passed up from the renderer. | 323 // The cursor for the page. This is passed up from the renderer. |
316 WebCursor current_cursor_; | 324 WebCursor current_cursor_; |
317 | 325 |
318 // Indicates if the page is loading. | 326 // Indicates if the page is loading. |
319 bool is_loading_; | 327 bool is_loading_; |
320 | 328 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 gfx::Point last_global_mouse_position_; | 412 gfx::Point last_global_mouse_position_; |
405 | 413 |
406 // In the case of the mouse being moved away from the view and then moved | 414 // In the case of the mouse being moved away from the view and then moved |
407 // back, we regard the mouse movement as (0, 0). | 415 // back, we regard the mouse movement as (0, 0). |
408 bool ignore_mouse_movement_; | 416 bool ignore_mouse_movement_; |
409 | 417 |
410 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); | 418 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); |
411 }; | 419 }; |
412 | 420 |
413 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 421 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
OLD | NEW |