| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/web_contents/web_contents_android.h" | 5 #include "content/browser/web_contents/web_contents_android.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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 WebContentsAndroid::GetJavaObject() { | 55 WebContentsAndroid::GetJavaObject() { |
| 56 return base::android::ScopedJavaLocalRef<jobject>(obj_); | 56 return base::android::ScopedJavaLocalRef<jobject>(obj_); |
| 57 } | 57 } |
| 58 | 58 |
| 59 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetTitle( | 59 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetTitle( |
| 60 JNIEnv* env, jobject obj) const { | 60 JNIEnv* env, jobject obj) const { |
| 61 return base::android::ConvertUTF16ToJavaString(env, | 61 return base::android::ConvertUTF16ToJavaString(env, |
| 62 web_contents_->GetTitle()); | 62 web_contents_->GetTitle()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetVisibleURL( |
| 66 JNIEnv* env, jobject obj) const { |
| 67 return base::android::ConvertUTF8ToJavaString( |
| 68 env, web_contents_->GetVisibleURL().spec()); |
| 69 } |
| 70 |
| 65 void WebContentsAndroid::Stop(JNIEnv* env, jobject obj) { | 71 void WebContentsAndroid::Stop(JNIEnv* env, jobject obj) { |
| 66 web_contents_->Stop(); | 72 web_contents_->Stop(); |
| 67 } | 73 } |
| 68 | 74 |
| 69 } // namespace content | 75 } // namespace content |
| OLD | NEW |