| OLD | NEW |
| 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 "chrome/browser/component/web_contents_delegate_android/web_contents_de
legate_android.h" | 5 #include "chrome/browser/component/web_contents_delegate_android/web_contents_de
legate_android.h" |
| 6 | 6 |
| 7 #include <android/keycodes.h> | 7 #include <android/keycodes.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 return Java_WebContentsDelegateAndroid_addMessageToConsole( | 238 return Java_WebContentsDelegateAndroid_addMessageToConsole( |
| 239 env, | 239 env, |
| 240 GetJavaDelegate(env).obj(), | 240 GetJavaDelegate(env).obj(), |
| 241 jlevel, | 241 jlevel, |
| 242 jmessage.obj(), | 242 jmessage.obj(), |
| 243 line_no, | 243 line_no, |
| 244 jsource_id.obj()); | 244 jsource_id.obj()); |
| 245 } | 245 } |
| 246 | 246 |
| 247 // TODO(merge): WARNING! method no longer available on the base class. | 247 // TODO(merge): WARNING! method no longer available on the base class. |
| 248 // See http://b/issue?id=5862108 | 248 // See http://crbug.com/149477 |
| 249 void WebContentsDelegateAndroid::URLStarredChanged(WebContents* source, | 249 void WebContentsDelegateAndroid::URLStarredChanged(WebContents* source, |
| 250 bool starred) { | 250 bool starred) { |
| 251 JNIEnv* env = AttachCurrentThread(); | 251 JNIEnv* env = AttachCurrentThread(); |
| 252 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 252 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
| 253 if (obj.is_null()) | 253 if (obj.is_null()) |
| 254 return; | 254 return; |
| 255 Java_WebContentsDelegateAndroid_onUrlStarredChanged(env, obj.obj(), starred); | 255 Java_WebContentsDelegateAndroid_onUrlStarredChanged(env, obj.obj(), starred); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // This is either called from TabContents::DidNavigateMainFramePostCommit() with | 258 // This is either called from TabContents::DidNavigateMainFramePostCommit() with |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 350 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
| 351 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { | 351 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { |
| 352 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; | 352 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; |
| 353 return false; | 353 return false; |
| 354 } | 354 } |
| 355 return RegisterNativesImpl(env); | 355 return RegisterNativesImpl(env); |
| 356 } | 356 } |
| 357 | 357 |
| 358 } // namespace web_contents_delegate_android | 358 } // namespace web_contents_delegate_android |
| OLD | NEW |