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

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

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

Powered by Google App Engine
This is Rietveld 408576698