| 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 "content/browser/renderer_host/java/java_bound_object.h" | 5 #include "content/browser/android/java/java_bound_object.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 13 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 13 #include "content/browser/android/java/java_bridge_dispatcher_host_manager.h" |
| 14 #include "content/browser/renderer_host/java/java_type.h" | 14 #include "content/browser/android/java/java_type.h" |
| 15 #include "content/browser/renderer_host/java/jni_helper.h" | 15 #include "content/browser/android/java/jni_helper.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "third_party/WebKit/public/web/WebBindings.h" | 17 #include "third_party/WebKit/public/web/WebBindings.h" |
| 18 | 18 |
| 19 using base::StringPrintf; | 19 using base::StringPrintf; |
| 20 using base::android::AttachCurrentThread; | 20 using base::android::AttachCurrentThread; |
| 21 using base::android::ConvertUTF8ToJavaString; | 21 using base::android::ConvertUTF8ToJavaString; |
| 22 using base::android::GetClass; | 22 using base::android::GetClass; |
| 23 using base::android::JavaRef; | 23 using base::android::JavaRef; |
| 24 using base::android::ScopedJavaGlobalRef; | 24 using base::android::ScopedJavaGlobalRef; |
| 25 using base::android::ScopedJavaLocalRef; | 25 using base::android::ScopedJavaLocalRef; |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 // static | 1031 // static |
| 1032 void JavaBoundObject::ThrowSecurityException(const char* message) { | 1032 void JavaBoundObject::ThrowSecurityException(const char* message) { |
| 1033 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1033 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1034 JNIEnv* env = AttachCurrentThread(); | 1034 JNIEnv* env = AttachCurrentThread(); |
| 1035 base::android::ScopedJavaLocalRef<jclass> clazz( | 1035 base::android::ScopedJavaLocalRef<jclass> clazz( |
| 1036 env, env->FindClass(kJavaLangSecurityExceptionClass)); | 1036 env, env->FindClass(kJavaLangSecurityExceptionClass)); |
| 1037 env->ThrowNew(clazz.obj(), message); | 1037 env->ThrowNew(clazz.obj(), message); |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 } // namespace content | 1040 } // namespace content |
| OLD | NEW |