| 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 2970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2981 params.showing_repost_interstitial = show_repost_interstitial; | 2981 params.showing_repost_interstitial = show_repost_interstitial; |
| 2982 Send(new ViewHostMsg_DidFailProvisionalLoadWithError( | 2982 Send(new ViewHostMsg_DidFailProvisionalLoadWithError( |
| 2983 routing_id_, params)); | 2983 routing_id_, params)); |
| 2984 | 2984 |
| 2985 // Don't display an error page if this is simply a cancelled load. Aside | 2985 // Don't display an error page if this is simply a cancelled load. Aside |
| 2986 // from being dumb, WebCore doesn't expect it and it will cause a crash. | 2986 // from being dumb, WebCore doesn't expect it and it will cause a crash. |
| 2987 if (error.reason == net::ERR_ABORTED) | 2987 if (error.reason == net::ERR_ABORTED) |
| 2988 return; | 2988 return; |
| 2989 // Don't display an error message if the request was handled by an | 2989 // Don't display an error message if the request was handled by an |
| 2990 // external protocol handler. | 2990 // external protocol handler. |
| 2991 if (error.reason == net::ERR_UNKNOWN_URL_SCHEME) | 2991 if (error.reason == net::ERR_UNKNOWN_URL_SCHEME || |
| 2992 error.domain == "ext") |
| 2992 return; | 2993 return; |
| 2993 | 2994 |
| 2994 // Make sure we never show errors in view source mode. | 2995 // Make sure we never show errors in view source mode. |
| 2995 frame->enableViewSourceMode(false); | 2996 frame->enableViewSourceMode(false); |
| 2996 | 2997 |
| 2997 DocumentState* document_state = DocumentState::FromDataSource(ds); | 2998 DocumentState* document_state = DocumentState::FromDataSource(ds); |
| 2998 NavigationState* navigation_state = document_state->navigation_state(); | 2999 NavigationState* navigation_state = document_state->navigation_state(); |
| 2999 | 3000 |
| 3000 // If this is a failed back/forward/reload navigation, then we need to do a | 3001 // If this is a failed back/forward/reload navigation, then we need to do a |
| 3001 // 'replace' load. This is necessary to avoid messing up session history. | 3002 // 'replace' load. This is necessary to avoid messing up session history. |
| (...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5683 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5684 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5684 return !!RenderThreadImpl::current()->compositor_thread(); | 5685 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5685 } | 5686 } |
| 5686 | 5687 |
| 5687 void RenderViewImpl::OnJavaBridgeInit() { | 5688 void RenderViewImpl::OnJavaBridgeInit() { |
| 5688 DCHECK(!java_bridge_dispatcher_); | 5689 DCHECK(!java_bridge_dispatcher_); |
| 5689 #if defined(ENABLE_JAVA_BRIDGE) | 5690 #if defined(ENABLE_JAVA_BRIDGE) |
| 5690 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5691 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5691 #endif | 5692 #endif |
| 5692 } | 5693 } |
| OLD | NEW |