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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetVisibleURL( | 65 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetVisibleURL( |
66 JNIEnv* env, jobject obj) const { | 66 JNIEnv* env, jobject obj) const { |
67 return base::android::ConvertUTF8ToJavaString( | 67 return base::android::ConvertUTF8ToJavaString( |
68 env, web_contents_->GetVisibleURL().spec()); | 68 env, web_contents_->GetVisibleURL().spec()); |
69 } | 69 } |
70 | 70 |
71 void WebContentsAndroid::Stop(JNIEnv* env, jobject obj) { | 71 void WebContentsAndroid::Stop(JNIEnv* env, jobject obj) { |
72 web_contents_->Stop(); | 72 web_contents_->Stop(); |
73 } | 73 } |
74 | 74 |
| 75 void WebContentsAndroid::InsertCSS( |
| 76 JNIEnv* env, jobject jobj, jstring jcss) { |
| 77 web_contents_->InsertCSS(base::android::ConvertJavaStringToUTF8(env, jcss)); |
| 78 } |
| 79 |
75 } // namespace content | 80 } // namespace content |
OLD | NEW |