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 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3408 void RenderViewImpl::didCommitProvisionalLoad(WebFrame* frame, | 3408 void RenderViewImpl::didCommitProvisionalLoad(WebFrame* frame, |
3409 bool is_new_navigation) { | 3409 bool is_new_navigation) { |
3410 DocumentState* document_state = | 3410 DocumentState* document_state = |
3411 DocumentState::FromDataSource(frame->dataSource()); | 3411 DocumentState::FromDataSource(frame->dataSource()); |
3412 NavigationState* navigation_state = document_state->navigation_state(); | 3412 NavigationState* navigation_state = document_state->navigation_state(); |
3413 | 3413 |
3414 if (document_state->commit_load_time().is_null()) | 3414 if (document_state->commit_load_time().is_null()) |
3415 document_state->set_commit_load_time(Time::Now()); | 3415 document_state->set_commit_load_time(Time::Now()); |
3416 | 3416 |
3417 if (document_state->must_reset_scroll_and_scale_state()) { | 3417 if (document_state->must_reset_scroll_and_scale_state()) { |
3418 #if defined(OS_ANDROID) // crbug.com/153907 | |
3419 webview()->resetScrollAndScaleState(); | 3418 webview()->resetScrollAndScaleState(); |
3420 #endif | |
3421 document_state->set_must_reset_scroll_and_scale_state(false); | 3419 document_state->set_must_reset_scroll_and_scale_state(false); |
3422 } | 3420 } |
3423 | 3421 |
3424 if (is_new_navigation) { | 3422 if (is_new_navigation) { |
3425 // When we perform a new navigation, we need to update the last committed | 3423 // When we perform a new navigation, we need to update the last committed |
3426 // session history entry with state for the page we are leaving. | 3424 // session history entry with state for the page we are leaving. |
3427 UpdateSessionHistory(frame); | 3425 UpdateSessionHistory(frame); |
3428 | 3426 |
3429 // We bump our Page ID to correspond with the new session history entry. | 3427 // We bump our Page ID to correspond with the new session history entry. |
3430 page_id_ = next_page_id_++; | 3428 page_id_ = next_page_id_++; |
(...skipping 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6513 } | 6511 } |
6514 #endif | 6512 #endif |
6515 | 6513 |
6516 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6514 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6517 TransportDIB::Handle dib_handle) { | 6515 TransportDIB::Handle dib_handle) { |
6518 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6516 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6519 RenderProcess::current()->ReleaseTransportDIB(dib); | 6517 RenderProcess::current()->ReleaseTransportDIB(dib); |
6520 } | 6518 } |
6521 | 6519 |
6522 } // namespace content | 6520 } // namespace content |
OLD | NEW |