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

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

Issue 481683003: Support for Adaptive Handle Orientation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some more cleaning up Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/popup_touch_handle_drawable.h" 5 #include "content/browser/android/popup_touch_handle_drawable.h"
6 6
7 #include "jni/PopupTouchHandleDrawable_jni.h" 7 #include "jni/PopupTouchHandleDrawable_jni.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 25 matching lines...) Expand all
36 break; 36 break;
37 37
38 case TOUCH_HANDLE_RIGHT: 38 case TOUCH_HANDLE_RIGHT:
39 Java_PopupTouchHandleDrawable_setRightOrientation(env, obj); 39 Java_PopupTouchHandleDrawable_setRightOrientation(env, obj);
40 break; 40 break;
41 41
42 case TOUCH_HANDLE_CENTER: 42 case TOUCH_HANDLE_CENTER:
43 Java_PopupTouchHandleDrawable_setCenterOrientation(env, obj); 43 Java_PopupTouchHandleDrawable_setCenterOrientation(env, obj);
44 break; 44 break;
45 45
46 // Inverted/flipped handles are not currently supported for
47 // synchronous (WebView) compositor case.
jdduke (slow) 2014/08/20 15:15:01 WebView is probably the *most* useful case for inv
AviD 2014/08/21 16:15:20 If the handles were to be drawn on top of Selected
48 case TOUCH_HANDLE_LEFT_INVERTED:
49 case TOUCH_HANDLE_RIGHT_INVERTED:
50 case TOUCH_HANDLE_LEFT_FLIPPED:
51 case TOUCH_HANDLE_RIGHT_FLIPPED:
52 case TOUCH_HANDLE_LEFT_FLIPPED_INVERTED:
53 case TOUCH_HANDLE_RIGHT_FLIPPED_INVERTED:
54 case TOUCH_HANDLE_CENTER_INVERTED:
46 case TOUCH_HANDLE_ORIENTATION_UNDEFINED: 55 case TOUCH_HANDLE_ORIENTATION_UNDEFINED:
47 NOTREACHED() << "Invalid touch handle orientation."; 56 NOTREACHED() << "Invalid touch handle orientation.";
48 }; 57 };
49 } 58 }
50 59
51 void PopupTouchHandleDrawable::SetAlpha(float alpha) { 60 void PopupTouchHandleDrawable::SetAlpha(float alpha) {
52 JNIEnv* env = base::android::AttachCurrentThread(); 61 JNIEnv* env = base::android::AttachCurrentThread();
53 Java_PopupTouchHandleDrawable_setOpacity(env, drawable_.obj(), alpha); 62 Java_PopupTouchHandleDrawable_setOpacity(env, drawable_.obj(), alpha);
54 } 63 }
55 64
(...skipping 19 matching lines...) Expand all
75 rect_pix.width(), 84 rect_pix.width(),
76 rect_pix.height()); 85 rect_pix.height());
77 } 86 }
78 87
79 // static 88 // static
80 bool PopupTouchHandleDrawable::RegisterPopupTouchHandleDrawable(JNIEnv* env) { 89 bool PopupTouchHandleDrawable::RegisterPopupTouchHandleDrawable(JNIEnv* env) {
81 return RegisterNativesImpl(env); 90 return RegisterNativesImpl(env);
82 } 91 }
83 92
84 } // namespace content 93 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698