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

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

Issue 984273002: Move onConsoleMessage implementation to chromium layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review 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
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 * @see AwContentsClient#onConsoleMessage(android.webkit.ConsoleMessage) 378 * @see AwContentsClient#onConsoleMessage(android.webkit.ConsoleMessage)
379 */ 379 */
380 @Override 380 @Override
381 public boolean onConsoleMessage(ConsoleMessage consoleMessage) { 381 public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
382 try { 382 try {
383 TraceEvent.begin("WebViewContentsClientAdapter.onConsoleMessage"); 383 TraceEvent.begin("WebViewContentsClientAdapter.onConsoleMessage");
384 boolean result; 384 boolean result;
385 if (mWebChromeClient != null) { 385 if (mWebChromeClient != null) {
386 if (TRACE) Log.d(TAG, "onConsoleMessage: " + consoleMessage.mess age()); 386 if (TRACE) Log.d(TAG, "onConsoleMessage: " + consoleMessage.mess age());
387 result = mWebChromeClient.onConsoleMessage(consoleMessage); 387 result = mWebChromeClient.onConsoleMessage(consoleMessage);
388 String message = consoleMessage.message();
389 if (result && message != null && message.startsWith("[blocked]") ) {
390 Log.e(TAG, "Blocked URL: " + message);
391 }
392 } else { 388 } else {
393 result = false; 389 result = false;
394 } 390 }
395 return result; 391 return result;
396 } finally { 392 } finally {
397 TraceEvent.end("WebViewContentsClientAdapter.onConsoleMessage"); 393 TraceEvent.end("WebViewContentsClientAdapter.onConsoleMessage");
398 } 394 }
399 } 395 }
400 396
401 /** 397 /**
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 else 1242 else
1247 mAwPermissionRequest.deny(); 1243 mAwPermissionRequest.deny();
1248 } 1244 }
1249 1245
1250 @Override 1246 @Override
1251 public void deny() { 1247 public void deny() {
1252 mAwPermissionRequest.deny(); 1248 mAwPermissionRequest.deny();
1253 } 1249 }
1254 } 1250 }
1255 } 1251 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698