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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 const JavaParamRef<jobject>& obj, | 329 const JavaParamRef<jobject>& obj, |
330 const JavaParamRef<jstring>& jstr) { | 330 const JavaParamRef<jstring>& jstr) { |
331 web_contents_->Replace(base::android::ConvertJavaStringToUTF16(env, jstr)); | 331 web_contents_->Replace(base::android::ConvertJavaStringToUTF16(env, jstr)); |
332 } | 332 } |
333 | 333 |
334 void WebContentsAndroid::SelectAll(JNIEnv* env, | 334 void WebContentsAndroid::SelectAll(JNIEnv* env, |
335 const JavaParamRef<jobject>& obj) { | 335 const JavaParamRef<jobject>& obj) { |
336 web_contents_->SelectAll(); | 336 web_contents_->SelectAll(); |
337 } | 337 } |
338 | 338 |
339 void WebContentsAndroid::Unselect(JNIEnv* env, | 339 void WebContentsAndroid::CollapseSelection(JNIEnv* env, |
340 const JavaParamRef<jobject>& obj) { | 340 const JavaParamRef<jobject>& obj) { |
341 web_contents_->Unselect(); | 341 web_contents_->CollapseSelection(); |
342 } | 342 } |
343 | 343 |
344 RenderWidgetHostViewAndroid* | 344 RenderWidgetHostViewAndroid* |
345 WebContentsAndroid::GetRenderWidgetHostViewAndroid() { | 345 WebContentsAndroid::GetRenderWidgetHostViewAndroid() { |
346 RenderWidgetHostView* rwhv = NULL; | 346 RenderWidgetHostView* rwhv = NULL; |
347 rwhv = web_contents_->GetRenderWidgetHostView(); | 347 rwhv = web_contents_->GetRenderWidgetHostView(); |
348 if (web_contents_->ShowingInterstitialPage()) { | 348 if (web_contents_->ShowingInterstitialPage()) { |
349 rwhv = web_contents_->GetInterstitialPage() | 349 rwhv = web_contents_->GetInterstitialPage() |
350 ->GetMainFrame() | 350 ->GetMainFrame() |
351 ->GetRenderViewHost() | 351 ->GetRenderViewHost() |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); | 760 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); |
761 } | 761 } |
762 | 762 |
763 void WebContentsAndroid::SetMediaSession( | 763 void WebContentsAndroid::SetMediaSession( |
764 const ScopedJavaLocalRef<jobject>& j_media_session) { | 764 const ScopedJavaLocalRef<jobject>& j_media_session) { |
765 JNIEnv* env = base::android::AttachCurrentThread(); | 765 JNIEnv* env = base::android::AttachCurrentThread(); |
766 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); | 766 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); |
767 } | 767 } |
768 | 768 |
769 } // namespace content | 769 } // namespace content |
OLD | NEW |