| 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 "components/web_contents_delegate_android/web_contents_delegate_android
.h" | 5 #include "components/web_contents_delegate_android/web_contents_delegate_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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 using base::android::AttachCurrentThread; | 26 using base::android::AttachCurrentThread; |
| 27 using base::android::ConvertUTF8ToJavaString; | 27 using base::android::ConvertUTF8ToJavaString; |
| 28 using base::android::ConvertUTF16ToJavaString; | 28 using base::android::ConvertUTF16ToJavaString; |
| 29 using base::android::HasClass; | 29 using base::android::HasClass; |
| 30 using base::android::ScopedJavaLocalRef; | 30 using base::android::ScopedJavaLocalRef; |
| 31 using content::ColorChooser; | 31 using content::ColorChooser; |
| 32 using content::WebContents; | 32 using content::WebContents; |
| 33 using content::WebContentsDelegate; | 33 using content::WebContentsDelegate; |
| 34 | 34 |
| 35 namespace components { | 35 namespace web_contents_delegate_android { |
| 36 | 36 |
| 37 WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj) | 37 WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj) |
| 38 : weak_java_delegate_(env, obj) { | 38 : weak_java_delegate_(env, obj) { |
| 39 } | 39 } |
| 40 | 40 |
| 41 WebContentsDelegateAndroid::~WebContentsDelegateAndroid() { | 41 WebContentsDelegateAndroid::~WebContentsDelegateAndroid() { |
| 42 } | 42 } |
| 43 | 43 |
| 44 ScopedJavaLocalRef<jobject> | 44 ScopedJavaLocalRef<jobject> |
| 45 WebContentsDelegateAndroid::GetJavaDelegate(JNIEnv* env) const { | 45 WebContentsDelegateAndroid::GetJavaDelegate(JNIEnv* env) const { |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // Register native methods | 332 // Register native methods |
| 333 | 333 |
| 334 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 334 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
| 335 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { | 335 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { |
| 336 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; | 336 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; |
| 337 return false; | 337 return false; |
| 338 } | 338 } |
| 339 return RegisterNativesImpl(env); | 339 return RegisterNativesImpl(env); |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace components | 342 } // namespace web_contents_delegate_android |
| OLD | NEW |