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

Unified Diff: ui/touch_selection/touch_handle_drawable_aura.cc

Issue 481683003: Support for Adaptive Handle Orientation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added corresponding methods in Aura Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/touch_selection/touch_handle_drawable_aura.h ('k') | ui/touch_selection/touch_handle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/touch_selection/touch_handle_drawable_aura.cc
diff --git a/ui/touch_selection/touch_handle_drawable_aura.cc b/ui/touch_selection/touch_handle_drawable_aura.cc
index a353c59a7fccd7f13457d4f73226ea3d4064445d..07f6b80ac8a87f1ac5832e76ae55933808670ac0 100644
--- a/ui/touch_selection/touch_handle_drawable_aura.cc
+++ b/ui/touch_selection/touch_handle_drawable_aura.cc
@@ -96,8 +96,9 @@ void TouchHandleDrawableAura::SetEnabled(bool enabled) {
window_->Hide();
}
-void TouchHandleDrawableAura::SetOrientation(
- TouchHandleOrientation orientation) {
+void TouchHandleDrawableAura::SetOrientation(TouchHandleOrientation orientation,
+ bool mirror_vertical,
+ bool mirror_horizontal) {
if (orientation_ == orientation)
jdduke (slow) 2015/09/14 18:38:41 Since it's unsupported, can you add DCHECK(!mirro
AviD 2015/09/21 15:40:16 Acknowledged.
return;
orientation_ = orientation;
@@ -133,6 +134,11 @@ void TouchHandleDrawableAura::SetOrientation(
UpdateBounds();
}
+void TouchHandleDrawableAura::SetOrigin(const gfx::PointF& position) {
+ focal_position_ = position;
jdduke (slow) 2015/09/14 18:38:41 Are you sure this is correct?
mohsen 2015/09/14 21:52:41 Now that we set origin instead of focus point, we
AviD 2015/09/21 15:40:16 @mohsen: I have changed SetOrientation to : void
mohsen 2015/09/21 20:24:22 Yeah, that seems fine to me. These handles are en
+ UpdateBounds();
+}
+
void TouchHandleDrawableAura::SetAlpha(float alpha) {
if (alpha == alpha_)
return;
@@ -145,11 +151,6 @@ void TouchHandleDrawableAura::SetAlpha(float alpha) {
window_->Hide();
}
-void TouchHandleDrawableAura::SetFocus(const gfx::PointF& position) {
- focal_position_ = position;
- UpdateBounds();
-}
-
gfx::RectF TouchHandleDrawableAura::GetVisibleBounds() const {
gfx::RectF bounds(window_->bounds());
bounds.Inset(kSelectionHandlePadding,
@@ -159,4 +160,9 @@ gfx::RectF TouchHandleDrawableAura::GetVisibleBounds() const {
return bounds;
}
+const float TouchHandleDrawableAura::GetDrawableHorizontalPaddingRatio() const {
+ // Aura does not have any transparent padding for its handle drawable.
+ return 0.0f;
jdduke (slow) 2015/09/14 18:38:41 Is that true?
mohsen 2015/09/14 21:52:41 Yes, there is no padding around handles in aura re
+}
+
} // namespace ui
« no previous file with comments | « ui/touch_selection/touch_handle_drawable_aura.h ('k') | ui/touch_selection/touch_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698