Chromium Code Reviews| 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 6 #define CHROME_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> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 public RenderWidgetHostView, | 68 public RenderWidgetHostView, |
| 69 public NotificationObserver, | 69 public NotificationObserver, |
| 70 public BrowserAccessibilityDelegate { | 70 public BrowserAccessibilityDelegate { |
| 71 public: | 71 public: |
| 72 // The view will associate itself with the given widget. | 72 // The view will associate itself with the given widget. |
| 73 explicit RenderWidgetHostViewWin(RenderWidgetHost* widget); | 73 explicit RenderWidgetHostViewWin(RenderWidgetHost* widget); |
| 74 virtual ~RenderWidgetHostViewWin(); | 74 virtual ~RenderWidgetHostViewWin(); |
| 75 | 75 |
| 76 void CreateWnd(HWND parent); | 76 void CreateWnd(HWND parent); |
| 77 | 77 |
| 78 // Schedule a composite no the compositor hwnd unless one was just done. | |
|
vangelis
2011/05/26 05:57:07
Is there a typo in this comment? I'm not sure wha
jbates
2011/05/26 18:21:16
Done.
| |
| 79 void ScheduleComposite(); | |
| 80 | |
| 78 DECLARE_WND_CLASS_EX(kRenderWidgetHostHWNDClass, CS_DBLCLKS, 0); | 81 DECLARE_WND_CLASS_EX(kRenderWidgetHostHWNDClass, CS_DBLCLKS, 0); |
| 79 | 82 |
| 80 BEGIN_MSG_MAP(RenderWidgetHostHWND) | 83 BEGIN_MSG_MAP(RenderWidgetHostHWND) |
| 81 MSG_WM_CREATE(OnCreate) | 84 MSG_WM_CREATE(OnCreate) |
| 82 MSG_WM_ACTIVATE(OnActivate) | 85 MSG_WM_ACTIVATE(OnActivate) |
| 83 MSG_WM_DESTROY(OnDestroy) | 86 MSG_WM_DESTROY(OnDestroy) |
| 84 MSG_WM_PAINT(OnPaint) | 87 MSG_WM_PAINT(OnPaint) |
| 85 MSG_WM_NCPAINT(OnNCPaint) | 88 MSG_WM_NCPAINT(OnNCPaint) |
| 86 MSG_WM_ERASEBKGND(OnEraseBkgnd) | 89 MSG_WM_ERASEBKGND(OnEraseBkgnd) |
| 87 MSG_WM_SETCURSOR(OnSetCursor) | 90 MSG_WM_SETCURSOR(OnSetCursor) |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 // will be tiled such that it lines up with existing tiles starting from the | 264 // will be tiled such that it lines up with existing tiles starting from the |
| 262 // origin of |dc|. | 265 // origin of |dc|. |
| 263 void DrawBackground(const RECT& rect, CPaintDC* dc); | 266 void DrawBackground(const RECT& rect, CPaintDC* dc); |
| 264 | 267 |
| 265 // Create an intermediate window between the given HWND and its parent. | 268 // Create an intermediate window between the given HWND and its parent. |
| 266 HWND ReparentWindow(HWND window); | 269 HWND ReparentWindow(HWND window); |
| 267 | 270 |
| 268 // Clean up the compositor window, if needed. | 271 // Clean up the compositor window, if needed. |
| 269 void CleanupCompositorWindow(); | 272 void CleanupCompositorWindow(); |
| 270 | 273 |
| 274 // Reset was_compositing_just_completed_ to false. | |
| 275 void ResetWasCompositingJustCompleted(); | |
|
nduca
2011/05/25 23:42:29
s/completed/scheduled/
jbates
2011/05/26 18:21:16
Done.
| |
| 276 | |
| 271 // Whether the window should be activated. | 277 // Whether the window should be activated. |
| 272 bool IsActivatable() const; | 278 bool IsActivatable() const; |
| 273 | 279 |
| 274 // The associated Model. | 280 // The associated Model. |
| 275 RenderWidgetHost* render_widget_host_; | 281 RenderWidgetHost* render_widget_host_; |
| 276 | 282 |
| 277 // When we are doing accelerated compositing | 283 // When we are doing accelerated compositing |
| 278 HWND compositor_host_window_; | 284 HWND compositor_host_window_; |
| 279 | 285 |
| 286 // If a composite operation was just done. | |
|
nduca
2011/05/25 23:42:29
You migth want to explain what this means in detai
jbates
2011/05/26 18:21:16
Done.
| |
| 287 bool was_compositing_just_completed_; | |
| 288 | |
| 280 // true if the compositor host window must be hidden after the | 289 // true if the compositor host window must be hidden after the |
| 281 // software renderered view is updated. | 290 // software renderered view is updated. |
| 282 bool hide_compositor_window_at_next_paint_; | 291 bool hide_compositor_window_at_next_paint_; |
| 283 | 292 |
| 284 // The cursor for the page. This is passed up from the renderer. | 293 // The cursor for the page. This is passed up from the renderer. |
| 285 WebCursor current_cursor_; | 294 WebCursor current_cursor_; |
| 286 | 295 |
| 287 // Indicates if the page is loading. | 296 // Indicates if the page is loading. |
| 288 bool is_loading_; | 297 bool is_loading_; |
| 289 | 298 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 // The tooltip control hwnd | 333 // The tooltip control hwnd |
| 325 HWND tooltip_hwnd_; | 334 HWND tooltip_hwnd_; |
| 326 // Whether or not a tooltip is currently visible. We use this to track | 335 // Whether or not a tooltip is currently visible. We use this to track |
| 327 // whether or not we want to force-close the tooltip when we receive mouse | 336 // whether or not we want to force-close the tooltip when we receive mouse |
| 328 // move notifications from the renderer. See comment in OnMsgSetTooltipText. | 337 // move notifications from the renderer. See comment in OnMsgSetTooltipText. |
| 329 bool tooltip_showing_; | 338 bool tooltip_showing_; |
| 330 | 339 |
| 331 // Factory used to safely scope delayed calls to ShutdownHost(). | 340 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 332 ScopedRunnableMethodFactory<RenderWidgetHostViewWin> shutdown_factory_; | 341 ScopedRunnableMethodFactory<RenderWidgetHostViewWin> shutdown_factory_; |
| 333 | 342 |
| 343 // Factory used to safely scope calls to RenderWidgetHostViewWin methods. | |
| 344 ScopedRunnableMethodFactory<RenderWidgetHostViewWin> method_factory_; | |
| 345 | |
| 334 // Our parent HWND. We keep a reference to it as we SetParent(NULL) when | 346 // Our parent HWND. We keep a reference to it as we SetParent(NULL) when |
| 335 // hidden to prevent getting messages (Paint, Resize...), and we reattach | 347 // hidden to prevent getting messages (Paint, Resize...), and we reattach |
| 336 // when shown again. | 348 // when shown again. |
| 337 HWND parent_hwnd_; | 349 HWND parent_hwnd_; |
| 338 | 350 |
| 339 // Instance of accessibility information for the root of the MSAA | 351 // Instance of accessibility information for the root of the MSAA |
| 340 // tree representation of the WebKit render tree. | 352 // tree representation of the WebKit render tree. |
| 341 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | 353 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; |
| 342 | 354 |
| 343 // The time at which this view started displaying white pixels as a result of | 355 // The time at which this view started displaying white pixels as a result of |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 360 WebKit::WebTextInputType text_input_type_; | 372 WebKit::WebTextInputType text_input_type_; |
| 361 | 373 |
| 362 ScopedVector<ui::ViewProp> props_; | 374 ScopedVector<ui::ViewProp> props_; |
| 363 | 375 |
| 364 scoped_ptr<ui::ViewProp> accessibility_prop_; | 376 scoped_ptr<ui::ViewProp> accessibility_prop_; |
| 365 | 377 |
| 366 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); | 378 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); |
| 367 }; | 379 }; |
| 368 | 380 |
| 369 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 381 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
| OLD | NEW |