| 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 4095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4106 bool is_pinned_to_right = offset.width >= maximum_offset.width; | 4106 bool is_pinned_to_right = offset.width >= maximum_offset.width; |
| 4107 | 4107 |
| 4108 if (is_pinned_to_left != cached_is_main_frame_pinned_to_left_ || | 4108 if (is_pinned_to_left != cached_is_main_frame_pinned_to_left_ || |
| 4109 is_pinned_to_right != cached_is_main_frame_pinned_to_right_) { | 4109 is_pinned_to_right != cached_is_main_frame_pinned_to_right_) { |
| 4110 Send(new ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame( | 4110 Send(new ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame( |
| 4111 routing_id_, is_pinned_to_left, is_pinned_to_right)); | 4111 routing_id_, is_pinned_to_left, is_pinned_to_right)); |
| 4112 | 4112 |
| 4113 cached_is_main_frame_pinned_to_left_ = is_pinned_to_left; | 4113 cached_is_main_frame_pinned_to_left_ = is_pinned_to_left; |
| 4114 cached_is_main_frame_pinned_to_right_ = is_pinned_to_right; | 4114 cached_is_main_frame_pinned_to_right_ = is_pinned_to_right; |
| 4115 } | 4115 } |
| 4116 |
| 4117 Send(new ViewHostMsg_DidChangeScrollOffset( |
| 4118 routing_id_, gfx::Vector2d(offset.width, offset.height))); |
| 4116 } | 4119 } |
| 4117 | 4120 |
| 4118 void RenderViewImpl::didChangeScrollOffset(WebFrame* frame) { | 4121 void RenderViewImpl::didChangeScrollOffset(WebFrame* frame) { |
| 4119 StartNavStateSyncTimerIfNecessary(); | 4122 StartNavStateSyncTimerIfNecessary(); |
| 4120 | 4123 |
| 4121 if (webview()->mainFrame() == frame) | 4124 if (webview()->mainFrame() == frame) |
| 4122 UpdateScrollState(frame); | 4125 UpdateScrollState(frame); |
| 4123 | 4126 |
| 4124 FOR_EACH_OBSERVER( | 4127 FOR_EACH_OBSERVER( |
| 4125 RenderViewObserver, observers_, DidChangeScrollOffset(frame)); | 4128 RenderViewObserver, observers_, DidChangeScrollOffset(frame)); |
| (...skipping 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6583 } | 6586 } |
| 6584 #endif | 6587 #endif |
| 6585 | 6588 |
| 6586 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6589 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6587 TransportDIB::Handle dib_handle) { | 6590 TransportDIB::Handle dib_handle) { |
| 6588 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6591 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6589 RenderProcess::current()->ReleaseTransportDIB(dib); | 6592 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6590 } | 6593 } |
| 6591 | 6594 |
| 6592 } // namespace content | 6595 } // namespace content |
| OLD | NEW |