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 3235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3246 return; | 3246 return; |
3247 | 3247 |
3248 if (enable_pinch) | 3248 if (enable_pinch) |
3249 webview()->setPageScaleFactorLimits(1, 4); | 3249 webview()->setPageScaleFactorLimits(1, 4); |
3250 else | 3250 else |
3251 webview()->setPageScaleFactorLimits(1, 1); | 3251 webview()->setPageScaleFactorLimits(1, 1); |
3252 } | 3252 } |
3253 | 3253 |
3254 void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) { | 3254 void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) { |
3255 WebDataSource* ds = frame->provisionalDataSource(); | 3255 WebDataSource* ds = frame->provisionalDataSource(); |
| 3256 |
| 3257 // In fast/loader/stop-provisional-loads.html, we abort the load before this |
| 3258 // callback is invoked. |
| 3259 if (!ds) |
| 3260 return; |
| 3261 |
3256 DocumentState* document_state = DocumentState::FromDataSource(ds); | 3262 DocumentState* document_state = DocumentState::FromDataSource(ds); |
3257 | 3263 |
3258 // We should only navigate to swappedout:// when is_swapped_out_ is true. | 3264 // We should only navigate to swappedout:// when is_swapped_out_ is true. |
3259 CHECK((ds->request().url() != GURL(kSwappedOutURL)) || | 3265 CHECK((ds->request().url() != GURL(kSwappedOutURL)) || |
3260 is_swapped_out_) << "Heard swappedout:// when not swapped out."; | 3266 is_swapped_out_) << "Heard swappedout:// when not swapped out."; |
3261 | 3267 |
3262 // Update the request time if WebKit has better knowledge of it. | 3268 // Update the request time if WebKit has better knowledge of it. |
3263 if (document_state->request_time().is_null()) { | 3269 if (document_state->request_time().is_null()) { |
3264 double event_time = ds->triggeringEventTime(); | 3270 double event_time = ds->triggeringEventTime(); |
3265 if (event_time != 0.0) | 3271 if (event_time != 0.0) |
(...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6506 } | 6512 } |
6507 #endif | 6513 #endif |
6508 | 6514 |
6509 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6515 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6510 TransportDIB::Handle dib_handle) { | 6516 TransportDIB::Handle dib_handle) { |
6511 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6517 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6512 RenderProcess::current()->ReleaseTransportDIB(dib); | 6518 RenderProcess::current()->ReleaseTransportDIB(dib); |
6513 } | 6519 } |
6514 | 6520 |
6515 } // namespace content | 6521 } // namespace content |
OLD | NEW |