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/bitmap_header.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_process_host.h" | 10 #include "chrome/browser/render_process_host.h" |
11 #include "chrome/browser/render_widget_helper.h" | 11 #include "chrome/browser/render_widget_helper.h" |
12 #include "chrome/browser/render_widget_host_view.h" | 12 #include "chrome/browser/render_widget_host_view.h" |
13 #include "chrome/common/mru_cache.h" | 13 #include "chrome/common/mru_cache.h" |
14 #include "chrome/common/win_util.h" | 14 #include "chrome/common/win_util.h" |
15 #include "chrome/views/view.h" | 15 #include "chrome/views/view.h" |
16 #include "webkit/glue/webcursor.h" | 16 #include "webkit/glue/webcursor.h" |
17 #include "webkit/glue/webinputevent.h" | 17 #include "webkit/glue/webinputevent.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 444 |
445 if (move.visible) | 445 if (move.visible) |
446 flags |= SWP_SHOWWINDOW; | 446 flags |= SWP_SHOWWINDOW; |
447 else | 447 else |
448 flags |= SWP_HIDEWINDOW; | 448 flags |= SWP_HIDEWINDOW; |
449 | 449 |
450 HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(), | 450 HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(), |
451 move.clip_rect.y(), | 451 move.clip_rect.y(), |
452 move.clip_rect.right(), | 452 move.clip_rect.right(), |
453 move.clip_rect.bottom()); | 453 move.clip_rect.bottom()); |
| 454 gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects); |
454 | 455 |
455 // Note: System will own the hrgn after we call SetWindowRgn, | 456 // Note: System will own the hrgn after we call SetWindowRgn, |
456 // so we don't need to call DeleteObject(hrgn) | 457 // so we don't need to call DeleteObject(hrgn) |
457 ::SetWindowRgn(move.window, hrgn, !move.clip_rect.IsEmpty()); | 458 ::SetWindowRgn(move.window, hrgn, !move.clip_rect.IsEmpty()); |
458 | 459 |
459 defer_window_pos_info = ::DeferWindowPos(defer_window_pos_info, | 460 defer_window_pos_info = ::DeferWindowPos(defer_window_pos_info, |
460 move.window, NULL, | 461 move.window, NULL, |
461 move.window_rect.x(), | 462 move.window_rect.x(), |
462 move.window_rect.y(), | 463 move.window_rect.y(), |
463 move.window_rect.width(), | 464 move.window_rect.width(), |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 | 829 |
829 void RenderWidgetHost::RendererExited() { | 830 void RenderWidgetHost::RendererExited() { |
830 BackingStoreManager::RemoveBackingStore(this); | 831 BackingStoreManager::RemoveBackingStore(this); |
831 } | 832 } |
832 | 833 |
833 void RenderWidgetHost::SystemThemeChanged() { | 834 void RenderWidgetHost::SystemThemeChanged() { |
834 Send(new ViewMsg_ThemeChanged(routing_id_)); | 835 Send(new ViewMsg_ThemeChanged(routing_id_)); |
835 } | 836 } |
836 | 837 |
837 | 838 |
OLD | NEW |