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.h" | 5 #include "chrome/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 const ViewHostMsg_UpdateRect_Params& params) { | 808 const ViewHostMsg_UpdateRect_Params& params) { |
809 TimeTicks paint_start = TimeTicks::Now(); | 809 TimeTicks paint_start = TimeTicks::Now(); |
810 | 810 |
811 NotificationService::current()->Notify( | 811 NotificationService::current()->Notify( |
812 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, | 812 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, |
813 Source<RenderWidgetHost>(this), | 813 Source<RenderWidgetHost>(this), |
814 NotificationService::NoDetails()); | 814 NotificationService::NoDetails()); |
815 | 815 |
816 // Update our knowledge of the RenderWidget's size. | 816 // Update our knowledge of the RenderWidget's size. |
817 current_size_ = params.view_size; | 817 current_size_ = params.view_size; |
| 818 // Update our knowledge of the RenderWidget's scroll offset. |
| 819 last_scroll_offset_ = params.scroll_offset; |
818 | 820 |
819 bool is_resize_ack = | 821 bool is_resize_ack = |
820 ViewHostMsg_UpdateRect_Flags::is_resize_ack(params.flags); | 822 ViewHostMsg_UpdateRect_Flags::is_resize_ack(params.flags); |
821 | 823 |
822 // resize_ack_pending_ needs to be cleared before we call DidPaintRect, since | 824 // resize_ack_pending_ needs to be cleared before we call DidPaintRect, since |
823 // that will end up reaching GetBackingStore. | 825 // that will end up reaching GetBackingStore. |
824 if (is_resize_ack) { | 826 if (is_resize_ack) { |
825 DCHECK(resize_ack_pending_); | 827 DCHECK(resize_ack_pending_); |
826 resize_ack_pending_ = false; | 828 resize_ack_pending_ = false; |
827 in_flight_size_.SetSize(0, 0); | 829 in_flight_size_.SetSize(0, 0); |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 return; | 1257 return; |
1256 | 1258 |
1257 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { | 1259 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { |
1258 #if defined(TOOLKIT_USES_GTK) | 1260 #if defined(TOOLKIT_USES_GTK) |
1259 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1261 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1260 #endif | 1262 #endif |
1261 } | 1263 } |
1262 | 1264 |
1263 deferred_plugin_handles_.clear(); | 1265 deferred_plugin_handles_.clear(); |
1264 } | 1266 } |
OLD | NEW |