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

Side by Side Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java

Issue 976393002: [Android WebView] Implement OnReceivedHttpError callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package com.android.webview.chromium; 5 package com.android.webview.chromium;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.ActivityNotFoundException; 8 import android.content.ActivityNotFoundException;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 // case for intercepted requests) AwContents will pass in null. 586 // case for intercepted requests) AwContents will pass in null.
587 description = mWebViewDelegate.getErrorString(mContext, errorCod e); 587 description = mWebViewDelegate.getErrorString(mContext, errorCod e);
588 } 588 }
589 if (TRACE) Log.d(TAG, "onReceivedError=" + failingUrl); 589 if (TRACE) Log.d(TAG, "onReceivedError=" + failingUrl);
590 mWebViewClient.onReceivedError(mWebView, errorCode, description, fai lingUrl); 590 mWebViewClient.onReceivedError(mWebView, errorCode, description, fai lingUrl);
591 } finally { 591 } finally {
592 TraceEvent.end("WebViewContentsClientAdapter.onReceivedError"); 592 TraceEvent.end("WebViewContentsClientAdapter.onReceivedError");
593 } 593 }
594 } 594 }
595 595
596 @Override
sgurun-gerrit only 2015/03/06 06:49:25 this code will need to go to the "new" glue layer.
mnaganov (inactive) 2015/03/06 12:58:25 I would argue that glue code functions should stil
597 public void onReceivedHttpError(AwWebResourceRequest request, AwWebResourceR esponse response) {
598 try {
599 TraceEvent.begin("WebViewContentsClientAdapter.onReceivedHttpError") ;
600 if (TRACE) Log.d(TAG, "onReceivedHttpError=" + request.url);
601 // TODO(mnaganov): Call mWebViewClient.onReceivedHttpError(mWebView, request, response);
602 } finally {
603 TraceEvent.end("WebViewContentsClientAdapter.onReceivedHttpError");
604 }
605 }
606
596 /** 607 /**
597 * @see ContentViewClient#onReceivedTitle(String) 608 * @see ContentViewClient#onReceivedTitle(String)
598 */ 609 */
599 @Override 610 @Override
600 public void onReceivedTitle(String title) { 611 public void onReceivedTitle(String title) {
601 try { 612 try {
602 TraceEvent.begin("WebViewContentsClientAdapter.onReceivedTitle"); 613 TraceEvent.begin("WebViewContentsClientAdapter.onReceivedTitle");
603 if (mWebChromeClient != null) { 614 if (mWebChromeClient != null) {
604 if (TRACE) Log.d(TAG, "onReceivedTitle"); 615 if (TRACE) Log.d(TAG, "onReceivedTitle");
605 mWebChromeClient.onReceivedTitle(mWebView, title); 616 mWebChromeClient.onReceivedTitle(mWebView, title);
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 else 1259 else
1249 mAwPermissionRequest.deny(); 1260 mAwPermissionRequest.deny();
1250 } 1261 }
1251 1262
1252 @Override 1263 @Override
1253 public void deny() { 1264 public void deny() {
1254 mAwPermissionRequest.deny(); 1265 mAwPermissionRequest.deny();
1255 } 1266 }
1256 } 1267 }
1257 } 1268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698