Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/render_widget_host.h" | 5 #include "chrome/browser/render_widget_host.h" |
| 6 | 6 |
| 7 #include "base/gfx/gdi_util.h" | 7 #include "base/gfx/gdi_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
| 10 #include "chrome/browser/render_widget_helper.h" | 10 #include "chrome/browser/render_widget_helper.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 441 | 441 |
| 442 HDWP defer_window_pos_info = | 442 HDWP defer_window_pos_info = |
| 443 ::BeginDeferWindowPos(static_cast<int>(plugin_window_moves.size())); | 443 ::BeginDeferWindowPos(static_cast<int>(plugin_window_moves.size())); |
| 444 | 444 |
| 445 if (!defer_window_pos_info) { | 445 if (!defer_window_pos_info) { |
| 446 NOTREACHED(); | 446 NOTREACHED(); |
| 447 return; | 447 return; |
| 448 } | 448 } |
| 449 | 449 |
| 450 for (size_t i = 0; i < plugin_window_moves.size(); ++i) { | 450 for (size_t i = 0; i < plugin_window_moves.size(); ++i) { |
| 451 // Don't invalidate now because that would result in cross process calls | 451 unsigned long flags = 0; |
|
darin (slow to review)
2009/01/22 00:40:03
maybe add some comments here about the choice of f
jam
2009/01/22 01:03:10
I was wondering about whether to add a comment or
| |
| 452 // that make scrolling slow. Instead the window is invalidated | |
| 453 // asynchronously by the plugin code. | |
| 454 unsigned long flags = SWP_NOREDRAW; | |
| 455 const WebPluginGeometry& move = plugin_window_moves[i]; | 452 const WebPluginGeometry& move = plugin_window_moves[i]; |
| 456 | 453 |
| 457 if (move.visible) | 454 if (move.visible) |
| 458 flags |= SWP_SHOWWINDOW; | 455 flags |= SWP_SHOWWINDOW; |
| 459 else | 456 else |
| 460 flags |= SWP_HIDEWINDOW; | 457 flags |= SWP_HIDEWINDOW; |
| 461 | 458 |
| 462 HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(), | 459 HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(), |
| 463 move.clip_rect.y(), | 460 move.clip_rect.y(), |
| 464 move.clip_rect.right(), | 461 move.clip_rect.right(), |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 843 &RenderWidgetHost::CheckRendererIsUnresponsive); | 840 &RenderWidgetHost::CheckRendererIsUnresponsive); |
| 844 } | 841 } |
| 845 | 842 |
| 846 void RenderWidgetHost::RendererExited() { | 843 void RenderWidgetHost::RendererExited() { |
| 847 BackingStoreManager::RemoveBackingStore(this); | 844 BackingStoreManager::RemoveBackingStore(this); |
| 848 } | 845 } |
| 849 | 846 |
| 850 void RenderWidgetHost::SystemThemeChanged() { | 847 void RenderWidgetHost::SystemThemeChanged() { |
| 851 Send(new ViewMsg_ThemeChanged(routing_id_)); | 848 Send(new ViewMsg_ThemeChanged(routing_id_)); |
| 852 } | 849 } |
| OLD | NEW |