| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 4101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4112 bool is_pinned_to_right = offset.width >= maximum_offset.width; | 4112 bool is_pinned_to_right = offset.width >= maximum_offset.width; |
| 4113 | 4113 |
| 4114 if (is_pinned_to_left != cached_is_main_frame_pinned_to_left_ || | 4114 if (is_pinned_to_left != cached_is_main_frame_pinned_to_left_ || |
| 4115 is_pinned_to_right != cached_is_main_frame_pinned_to_right_) { | 4115 is_pinned_to_right != cached_is_main_frame_pinned_to_right_) { |
| 4116 Send(new ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame( | 4116 Send(new ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame( |
| 4117 routing_id_, is_pinned_to_left, is_pinned_to_right)); | 4117 routing_id_, is_pinned_to_left, is_pinned_to_right)); |
| 4118 | 4118 |
| 4119 cached_is_main_frame_pinned_to_left_ = is_pinned_to_left; | 4119 cached_is_main_frame_pinned_to_left_ = is_pinned_to_left; |
| 4120 cached_is_main_frame_pinned_to_right_ = is_pinned_to_right; | 4120 cached_is_main_frame_pinned_to_right_ = is_pinned_to_right; |
| 4121 } | 4121 } |
| 4122 |
| 4123 Send(new ViewHostMsg_DidChangeScrollOffset( |
| 4124 routing_id_, gfx::Vector2d(offset.width, offset.height))); |
| 4122 } | 4125 } |
| 4123 | 4126 |
| 4124 void RenderViewImpl::didChangeScrollOffset(WebFrame* frame) { | 4127 void RenderViewImpl::didChangeScrollOffset(WebFrame* frame) { |
| 4125 StartNavStateSyncTimerIfNecessary(); | 4128 StartNavStateSyncTimerIfNecessary(); |
| 4126 | 4129 |
| 4127 if (webview()->mainFrame() == frame) | 4130 if (webview()->mainFrame() == frame) |
| 4128 UpdateScrollState(frame); | 4131 UpdateScrollState(frame); |
| 4129 | 4132 |
| 4130 FOR_EACH_OBSERVER( | 4133 FOR_EACH_OBSERVER( |
| 4131 RenderViewObserver, observers_, DidChangeScrollOffset(frame)); | 4134 RenderViewObserver, observers_, DidChangeScrollOffset(frame)); |
| (...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6591 } | 6594 } |
| 6592 #endif | 6595 #endif |
| 6593 | 6596 |
| 6594 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6597 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6595 TransportDIB::Handle dib_handle) { | 6598 TransportDIB::Handle dib_handle) { |
| 6596 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6599 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6597 RenderProcess::current()->ReleaseTransportDIB(dib); | 6600 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6598 } | 6601 } |
| 6599 | 6602 |
| 6600 } // namespace content | 6603 } // namespace content |
| OLD | NEW |