| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/render_widget_host_view_win.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/l10n_util_win.h" | 8 #include "app/l10n_util_win.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 if (!scroll_rect.IsEmpty()) { | 723 if (!scroll_rect.IsEmpty()) { |
| 724 RECT clip_rect = scroll_rect.ToRECT(); | 724 RECT clip_rect = scroll_rect.ToRECT(); |
| 725 ScrollWindowEx(scroll_dx, scroll_dy, NULL, &clip_rect, NULL, NULL, | 725 ScrollWindowEx(scroll_dx, scroll_dy, NULL, &clip_rect, NULL, NULL, |
| 726 SW_INVALIDATE); | 726 SW_INVALIDATE); |
| 727 } | 727 } |
| 728 | 728 |
| 729 if (!about_to_validate_and_paint_) | 729 if (!about_to_validate_and_paint_) |
| 730 Redraw(); | 730 Redraw(); |
| 731 } | 731 } |
| 732 | 732 |
| 733 void RenderWidgetHostViewWin::RenderViewGone() { | 733 void RenderWidgetHostViewWin::RenderViewGone(base::TerminationStatus status, |
| 734 int error_code) { |
| 734 // TODO(darin): keep this around, and draw sad-tab into it. | 735 // TODO(darin): keep this around, and draw sad-tab into it. |
| 735 UpdateCursorIfOverSelf(); | 736 UpdateCursorIfOverSelf(); |
| 736 being_destroyed_ = true; | 737 being_destroyed_ = true; |
| 737 DestroyWindow(); | 738 DestroyWindow(); |
| 738 } | 739 } |
| 739 | 740 |
| 740 void RenderWidgetHostViewWin::WillDestroyRenderWidget(RenderWidgetHost* rwh) { | 741 void RenderWidgetHostViewWin::WillDestroyRenderWidget(RenderWidgetHost* rwh) { |
| 741 if (rwh == render_widget_host_) | 742 if (rwh == render_widget_host_) |
| 742 render_widget_host_ = NULL; | 743 render_widget_host_ = NULL; |
| 743 } | 744 } |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1699 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
| 1699 gfx::NativeView native_view) { | 1700 gfx::NativeView native_view) { |
| 1700 if (::IsWindow(native_view)) { | 1701 if (::IsWindow(native_view)) { |
| 1701 HANDLE raw_render_host_view = ::GetProp(native_view, | 1702 HANDLE raw_render_host_view = ::GetProp(native_view, |
| 1702 kRenderWidgetHostViewKey); | 1703 kRenderWidgetHostViewKey); |
| 1703 if (raw_render_host_view) | 1704 if (raw_render_host_view) |
| 1704 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); | 1705 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); |
| 1705 } | 1706 } |
| 1706 return NULL; | 1707 return NULL; |
| 1707 } | 1708 } |
| OLD | NEW |