| 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 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 ¶ms.error_description); | 3003 ¶ms.error_description); |
| 3004 params.url = error.unreachableURL; | 3004 params.url = error.unreachableURL; |
| 3005 params.showing_repost_interstitial = show_repost_interstitial; | 3005 params.showing_repost_interstitial = show_repost_interstitial; |
| 3006 Send(new ViewHostMsg_DidFailProvisionalLoadWithError( | 3006 Send(new ViewHostMsg_DidFailProvisionalLoadWithError( |
| 3007 routing_id_, params)); | 3007 routing_id_, params)); |
| 3008 | 3008 |
| 3009 // Don't display an error page if this is simply a cancelled load. Aside | 3009 // Don't display an error page if this is simply a cancelled load. Aside |
| 3010 // from being dumb, WebCore doesn't expect it and it will cause a crash. | 3010 // from being dumb, WebCore doesn't expect it and it will cause a crash. |
| 3011 if (error.reason == net::ERR_ABORTED) | 3011 if (error.reason == net::ERR_ABORTED) |
| 3012 return; | 3012 return; |
| 3013 // Don't display an error message if the request was handled by an | |
| 3014 // external protocol handler. | |
| 3015 if (error.reason == net::ERR_UNKNOWN_URL_SCHEME) | |
| 3016 return; | |
| 3017 | 3013 |
| 3018 // Make sure we never show errors in view source mode. | 3014 // Make sure we never show errors in view source mode. |
| 3019 frame->enableViewSourceMode(false); | 3015 frame->enableViewSourceMode(false); |
| 3020 | 3016 |
| 3021 DocumentState* document_state = DocumentState::FromDataSource(ds); | 3017 DocumentState* document_state = DocumentState::FromDataSource(ds); |
| 3022 NavigationState* navigation_state = document_state->navigation_state(); | 3018 NavigationState* navigation_state = document_state->navigation_state(); |
| 3023 | 3019 |
| 3024 // If this is a failed back/forward/reload navigation, then we need to do a | 3020 // If this is a failed back/forward/reload navigation, then we need to do a |
| 3025 // 'replace' load. This is necessary to avoid messing up session history. | 3021 // 'replace' load. This is necessary to avoid messing up session history. |
| 3026 // Otherwise, we do a normal load, which simulates a 'go' navigation as far | 3022 // Otherwise, we do a normal load, which simulates a 'go' navigation as far |
| (...skipping 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5720 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5716 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5721 return !!RenderThreadImpl::current()->compositor_thread(); | 5717 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5722 } | 5718 } |
| 5723 | 5719 |
| 5724 void RenderViewImpl::OnJavaBridgeInit() { | 5720 void RenderViewImpl::OnJavaBridgeInit() { |
| 5725 DCHECK(!java_bridge_dispatcher_); | 5721 DCHECK(!java_bridge_dispatcher_); |
| 5726 #if defined(ENABLE_JAVA_BRIDGE) | 5722 #if defined(ENABLE_JAVA_BRIDGE) |
| 5727 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5723 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5728 #endif | 5724 #endif |
| 5729 } | 5725 } |
| OLD | NEW |