Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 2169553002: Properly throw java exceptions from shouldOverrideUrlLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test-only subclasses for JavaHandlerThread and SystemMessageHandler. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 bool is_redirect, 121 bool is_redirect,
122 bool is_main_frame, 122 bool is_main_frame,
123 bool* ignore_navigation) { 123 bool* ignore_navigation) {
124 DCHECK_CURRENTLY_ON(BrowserThread::UI); 124 DCHECK_CURRENTLY_ON(BrowserThread::UI);
125 *ignore_navigation = false; 125 *ignore_navigation = false;
126 AwContentsClientBridgeBase* client = 126 AwContentsClientBridgeBase* client =
127 AwContentsClientBridgeBase::FromID(process_id_, render_frame_id); 127 AwContentsClientBridgeBase::FromID(process_id_, render_frame_id);
128 if (client) { 128 if (client) {
129 *ignore_navigation = client->ShouldOverrideUrlLoading( 129 *ignore_navigation = client->ShouldOverrideUrlLoading(
130 url, has_user_gesture, is_redirect, is_main_frame); 130 url, has_user_gesture, is_redirect, is_main_frame);
131 // If the shouldOverrideUrlLoading call caused a java exception we should
132 // always return immediately here!
131 } else { 133 } else {
132 LOG(WARNING) << "Failed to find the associated render view host for url: " 134 LOG(WARNING) << "Failed to find the associated render view host for url: "
133 << url; 135 << url;
134 } 136 }
135 } 137 }
136 138
137 void AwContentsMessageFilter::OnSubFrameCreated(int parent_render_frame_id, 139 void AwContentsMessageFilter::OnSubFrameCreated(int parent_render_frame_id,
138 int child_render_frame_id) { 140 int child_render_frame_id) {
139 AwContentsIoThreadClient::SubFrameCreated( 141 AwContentsIoThreadClient::SubFrameCreated(
140 process_id_, parent_render_frame_id, child_render_frame_id); 142 process_id_, parent_render_frame_id, child_render_frame_id);
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 507
506 #if defined(VIDEO_HOLE) 508 #if defined(VIDEO_HOLE)
507 content::ExternalVideoSurfaceContainer* 509 content::ExternalVideoSurfaceContainer*
508 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 510 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
509 content::WebContents* web_contents) { 511 content::WebContents* web_contents) {
510 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); 512 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents);
511 } 513 }
512 #endif 514 #endif
513 515
514 } // namespace android_webview 516 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java » ('j') | base/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698