OLD | NEW |
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 Loading... |
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 |
| 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 Loading... |
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 } |
OLD | NEW |