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

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

Issue 2708613002: Add EventForwarder for routing touch events (Closed)
Patch Set: EventForwarder... 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 jboolean value) { 708 jboolean value) {
709 web_contents_->SetHasPersistentVideo(value); 709 web_contents_->SetHasPersistentVideo(value);
710 } 710 }
711 711
712 bool WebContentsAndroid::HasActiveEffectivelyFullscreenVideo( 712 bool WebContentsAndroid::HasActiveEffectivelyFullscreenVideo(
713 JNIEnv* env, 713 JNIEnv* env,
714 const base::android::JavaParamRef<jobject>& obj) { 714 const base::android::JavaParamRef<jobject>& obj) {
715 return web_contents_->HasActiveEffectivelyFullscreenVideo(); 715 return web_contents_->HasActiveEffectivelyFullscreenVideo();
716 } 716 }
717 717
718 ScopedJavaLocalRef<jobject> WebContentsAndroid::GetOrCreateEventForwarder(
719 JNIEnv* env,
720 const base::android::JavaParamRef<jobject>& obj) {
721 gfx::NativeView native_view = web_contents_->GetView()->GetNativeView();
722 return native_view->GetEventForwarder();
723 }
724
718 void WebContentsAndroid::OnFinishGetContentBitmap( 725 void WebContentsAndroid::OnFinishGetContentBitmap(
719 const JavaRef<jobject>& obj, 726 const JavaRef<jobject>& obj,
720 const JavaRef<jobject>& callback, 727 const JavaRef<jobject>& callback,
721 const SkBitmap& bitmap, 728 const SkBitmap& bitmap,
722 ReadbackResponse response) { 729 ReadbackResponse response) {
723 JNIEnv* env = base::android::AttachCurrentThread(); 730 JNIEnv* env = base::android::AttachCurrentThread();
724 ScopedJavaLocalRef<jobject> java_bitmap; 731 ScopedJavaLocalRef<jobject> java_bitmap;
725 if (response == READBACK_SUCCESS) 732 if (response == READBACK_SUCCESS)
726 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); 733 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
727 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback, 734 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); 766 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes);
760 } 767 }
761 768
762 void WebContentsAndroid::SetMediaSession( 769 void WebContentsAndroid::SetMediaSession(
763 const ScopedJavaLocalRef<jobject>& j_media_session) { 770 const ScopedJavaLocalRef<jobject>& j_media_session) {
764 JNIEnv* env = base::android::AttachCurrentThread(); 771 JNIEnv* env = base::android::AttachCurrentThread();
765 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 772 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
766 } 773 }
767 774
768 } // namespace content 775 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/browser/web_contents/web_contents_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698