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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 1390163003: Cleanup of some old TODOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 return false; 554 return false;
555 555
556 const blink::WebGestureEvent& gesture = 556 const blink::WebGestureEvent& gesture =
557 static_cast<const blink::WebGestureEvent&>(event); 557 static_cast<const blink::WebGestureEvent&>(event);
558 int gesture_type = ToGestureEventType(event.type); 558 int gesture_type = ToGestureEventType(event.type);
559 return Java_ContentViewCore_filterTapOrPressEvent(env, 559 return Java_ContentViewCore_filterTapOrPressEvent(env,
560 j_obj.obj(), 560 j_obj.obj(),
561 gesture_type, 561 gesture_type,
562 gesture.x * dpi_scale(), 562 gesture.x * dpi_scale(),
563 gesture.y * dpi_scale()); 563 gesture.y * dpi_scale());
564
565 // TODO(jdduke): Also report double-tap UMA, crbug/347568.
566 } 564 }
567 565
568 bool ContentViewCoreImpl::HasFocus() { 566 bool ContentViewCoreImpl::HasFocus() {
569 JNIEnv* env = AttachCurrentThread(); 567 JNIEnv* env = AttachCurrentThread();
570 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 568 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
571 if (obj.is_null()) 569 if (obj.is_null())
572 return false; 570 return false;
573 return Java_ContentViewCore_hasFocus(env, obj.obj()); 571 return Java_ContentViewCore_hasFocus(env, obj.obj());
574 } 572 }
575 573
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 return ScopedJavaLocalRef<jobject>(); 1445 return ScopedJavaLocalRef<jobject>();
1448 1446
1449 return view->GetJavaObject(); 1447 return view->GetJavaObject();
1450 } 1448 }
1451 1449
1452 bool RegisterContentViewCore(JNIEnv* env) { 1450 bool RegisterContentViewCore(JNIEnv* env) {
1453 return RegisterNativesImpl(env); 1451 return RegisterNativesImpl(env);
1454 } 1452 }
1455 1453
1456 } // namespace content 1454 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/browser/renderer_host/input/gesture_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698