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

Side by Side Diff: ash/touch/touch_hud_projection.cc

Issue 19271002: Fix projection touch HUD in RTL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied reviews Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/touch/touch_hud_projection.h" 5 #include "ash/touch/touch_hud_projection.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/property_util.h" 9 #include "ash/wm/property_util.h"
10 #include "third_party/skia/include/effects/SkGradientShader.h" 10 #include "third_party/skia/include/effects/SkGradientShader.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 void UpdateTouch(const ui::TouchEvent& touch) { 58 void UpdateTouch(const ui::TouchEvent& touch) {
59 if (touch.type() == ui::ET_TOUCH_RELEASED || 59 if (touch.type() == ui::ET_TOUCH_RELEASED ||
60 touch.type() == ui::ET_TOUCH_CANCELLED) { 60 touch.type() == ui::ET_TOUCH_CANCELLED) {
61 fadeout_.reset(new ui::LinearAnimation(kFadeoutDurationInMs, 61 fadeout_.reset(new ui::LinearAnimation(kFadeoutDurationInMs,
62 kFadeoutFrameRate, 62 kFadeoutFrameRate,
63 this)); 63 this));
64 fadeout_->Start(); 64 fadeout_->Start();
65 } else { 65 } else {
66 SetX(touch.root_location().x() - kPointRadius - 1); 66 SetX(parent()->GetMirroredXInView(touch.root_location().x()) -
67 kPointRadius - 1);
67 SetY(touch.root_location().y() - kPointRadius - 1); 68 SetY(touch.root_location().y() - kPointRadius - 1);
68 } 69 }
69 } 70 }
70 71
71 void Remove() { 72 void Remove() {
72 delete this; 73 delete this;
73 } 74 }
74 75
75 private: 76 private:
76 virtual ~TouchPointView() { 77 virtual ~TouchPointView() {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 controller->set_touch_hud_projection(this); 178 controller->set_touch_hud_projection(this);
178 } 179 }
179 180
180 void TouchHudProjection::UnsetHudForRootWindowController( 181 void TouchHudProjection::UnsetHudForRootWindowController(
181 RootWindowController* controller) { 182 RootWindowController* controller) {
182 controller->set_touch_hud_projection(NULL); 183 controller->set_touch_hud_projection(NULL);
183 } 184 }
184 185
185 } // namespace internal 186 } // namespace internal
186 } // namespace ash 187 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698