| 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_process_host.h" | 10 #include "chrome/browser/render_process_host.h" |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 const gfx::Size& view_size) { | 781 const gfx::Size& view_size) { |
| 782 if (is_hidden_) { | 782 if (is_hidden_) { |
| 783 needs_repainting_on_restore_ = true; | 783 needs_repainting_on_restore_ = true; |
| 784 return; | 784 return; |
| 785 } | 785 } |
| 786 | 786 |
| 787 // TODO(darin): do we need to do something else if our backing store is not | 787 // TODO(darin): do we need to do something else if our backing store is not |
| 788 // the same size as the advertised view? maybe we just assume there is a | 788 // the same size as the advertised view? maybe we just assume there is a |
| 789 // full paint on its way? | 789 // full paint on its way? |
| 790 BackingStore* backing_store = BackingStoreManager::Lookup(this); | 790 BackingStore* backing_store = BackingStoreManager::Lookup(this); |
| 791 if (backing_store && backing_store->size() != view_size) | 791 if (!backing_store || (backing_store->size() != view_size)) |
| 792 return; | 792 return; |
| 793 | 793 |
| 794 RECT damaged_rect, r = clip_rect.ToRECT(); | 794 RECT damaged_rect, r = clip_rect.ToRECT(); |
| 795 ScrollDC(backing_store->dc(), dx, dy, NULL, &r, NULL, &damaged_rect); | 795 ScrollDC(backing_store->dc(), dx, dy, NULL, &r, NULL, &damaged_rect); |
| 796 | 796 |
| 797 // TODO(darin): this doesn't work if dx and dy are both non-zero! | 797 // TODO(darin): this doesn't work if dx and dy are both non-zero! |
| 798 DCHECK(dx == 0 || dy == 0); | 798 DCHECK(dx == 0 || dy == 0); |
| 799 | 799 |
| 800 // We expect that damaged_rect should equal bitmap_rect. | 800 // We expect that damaged_rect should equal bitmap_rect. |
| 801 DCHECK(gfx::Rect(damaged_rect) == bitmap_rect); | 801 DCHECK(gfx::Rect(damaged_rect) == bitmap_rect); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 831 &RenderWidgetHost::CheckRendererIsUnresponsive); | 831 &RenderWidgetHost::CheckRendererIsUnresponsive); |
| 832 } | 832 } |
| 833 | 833 |
| 834 void RenderWidgetHost::RendererExited() { | 834 void RenderWidgetHost::RendererExited() { |
| 835 BackingStoreManager::RemoveBackingStore(this); | 835 BackingStoreManager::RemoveBackingStore(this); |
| 836 } | 836 } |
| 837 | 837 |
| 838 void RenderWidgetHost::SystemThemeChanged() { | 838 void RenderWidgetHost::SystemThemeChanged() { |
| 839 Send(new ViewMsg_ThemeChanged(routing_id_)); | 839 Send(new ViewMsg_ThemeChanged(routing_id_)); |
| 840 } | 840 } |
| OLD | NEW |