Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: content/browser/web_contents/web_contents_android.cc

Issue 2741043004: Revert of Add Java wrapper for RenderFrameHost (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 base::android::ScopedJavaLocalRef<jobject> 288 base::android::ScopedJavaLocalRef<jobject>
289 WebContentsAndroid::GetTopLevelNativeWindow(JNIEnv* env, 289 WebContentsAndroid::GetTopLevelNativeWindow(JNIEnv* env,
290 const JavaParamRef<jobject>& obj) { 290 const JavaParamRef<jobject>& obj) {
291 ui::WindowAndroid* window_android = web_contents_->GetTopLevelNativeWindow(); 291 ui::WindowAndroid* window_android = web_contents_->GetTopLevelNativeWindow();
292 if (!window_android) 292 if (!window_android)
293 return nullptr; 293 return nullptr;
294 return window_android->GetJavaObject(); 294 return window_android->GetJavaObject();
295 } 295 }
296 296
297 ScopedJavaLocalRef<jobject> WebContentsAndroid::GetMainFrame(
298 JNIEnv* env,
299 const JavaParamRef<jobject>& obj) const {
300 return web_contents_->GetMainFrame()->GetJavaRenderFrameHost();
301 }
302
303 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetTitle( 297 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetTitle(
304 JNIEnv* env, 298 JNIEnv* env,
305 const JavaParamRef<jobject>& obj) const { 299 const JavaParamRef<jobject>& obj) const {
306 return base::android::ConvertUTF16ToJavaString(env, 300 return base::android::ConvertUTF16ToJavaString(env,
307 web_contents_->GetTitle()); 301 web_contents_->GetTitle());
308 } 302 }
309 303
310 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetVisibleURL( 304 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetVisibleURL(
311 JNIEnv* env, 305 JNIEnv* env,
312 const JavaParamRef<jobject>& obj) const { 306 const JavaParamRef<jobject>& obj) const {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); 770 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes);
777 } 771 }
778 772
779 void WebContentsAndroid::SetMediaSession( 773 void WebContentsAndroid::SetMediaSession(
780 const ScopedJavaLocalRef<jobject>& j_media_session) { 774 const ScopedJavaLocalRef<jobject>& j_media_session) {
781 JNIEnv* env = base::android::AttachCurrentThread(); 775 JNIEnv* env = base::android::AttachCurrentThread();
782 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 776 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
783 } 777 }
784 778
785 } // namespace content 779 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698