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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java

Issue 1178253005: Use Chromium's logging utility for content files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.ActivityNotFoundException; 7 import android.content.ActivityNotFoundException;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.view.ActionMode; 10 import android.view.ActionMode;
(...skipping 10 matching lines...) Expand all
21 * required to implement the WebView API. 21 * required to implement the WebView API.
22 * The memory and reference ownership of this class is unusual - see the .cc fi le and ContentView 22 * The memory and reference ownership of this class is unusual - see the .cc fi le and ContentView
23 * for more details. 23 * for more details.
24 * 24 *
25 * TODO(mkosiba): Rid this guy of default implementations. This class is used b y both WebView and 25 * TODO(mkosiba): Rid this guy of default implementations. This class is used b y both WebView and
26 * the browser and we don't want a the browser-specific default implementation to accidentally leak 26 * the browser and we don't want a the browser-specific default implementation to accidentally leak
27 * over to WebView. 27 * over to WebView.
28 */ 28 */
29 public class ContentViewClient { 29 public class ContentViewClient {
30 // Tag used for logging. 30 // Tag used for logging.
31 private static final String TAG = "ContentViewClient"; 31 private static final String TAG = "cr.ContentViewClient";
32 32
33 public void onUpdateTitle(String title) { 33 public void onUpdateTitle(String title) {
34 } 34 }
35 35
36 /** 36 /**
37 * Called whenever the background color of the page changes as notified by W ebKit. 37 * Called whenever the background color of the page changes as notified by W ebKit.
38 * @param color The new ARGB color of the page background. 38 * @param color The new ARGB color of the page background.
39 */ 39 */
40 public void onBackgroundColorChanged(int color) { 40 public void onBackgroundColorChanged(int color) {
41 } 41 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 /** 138 /**
139 * Called when a new content intent is requested to be started. 139 * Called when a new content intent is requested to be started.
140 */ 140 */
141 public void onStartContentIntent(Context context, String intentUrl) { 141 public void onStartContentIntent(Context context, String intentUrl) {
142 Intent intent; 142 Intent intent;
143 // Perform generic parsing of the URI to turn it into an Intent. 143 // Perform generic parsing of the URI to turn it into an Intent.
144 try { 144 try {
145 intent = Intent.parseUri(intentUrl, Intent.URI_INTENT_SCHEME); 145 intent = Intent.parseUri(intentUrl, Intent.URI_INTENT_SCHEME);
146 } catch (Exception ex) { 146 } catch (Exception ex) {
147 Log.w(TAG, "Bad URI " + intentUrl, ex); 147 Log.w(TAG, "Bad URI %s", intentUrl, ex);
148 return; 148 return;
149 } 149 }
150 150
151 try { 151 try {
152 context.startActivity(intent); 152 context.startActivity(intent);
153 } catch (ActivityNotFoundException ex) { 153 } catch (ActivityNotFoundException ex) {
154 Log.w(TAG, "No application can handle " + intentUrl); 154 Log.w(TAG, "No application can handle %s", intentUrl);
155 } 155 }
156 } 156 }
157 157
158 public ContentVideoViewClient getContentVideoViewClient() { 158 public ContentVideoViewClient getContentVideoViewClient() {
159 return null; 159 return null;
160 } 160 }
161 161
162 /** 162 /**
163 * Called when BrowserMediaPlayerManager wants to load a media resource. 163 * Called when BrowserMediaPlayerManager wants to load a media resource.
164 * @param url the URL of media resource to load. 164 * @param url the URL of media resource to load.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 || keyCode == KeyEvent.KEYCODE_CAMERA 197 || keyCode == KeyEvent.KEYCODE_CAMERA
198 || keyCode == KeyEvent.KEYCODE_FOCUS 198 || keyCode == KeyEvent.KEYCODE_FOCUS
199 || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN 199 || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN
200 || keyCode == KeyEvent.KEYCODE_VOLUME_MUTE 200 || keyCode == KeyEvent.KEYCODE_VOLUME_MUTE
201 || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { 201 || keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
202 return false; 202 return false;
203 } 203 }
204 return true; 204 return true;
205 } 205 }
206 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698