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

Side by Side Diff: ash/display/event_transformation_handler.h

Issue 11743013: Scaling scroll/fling events in multi-monitor setup (Closed) Base URL: https://chromium.googlesource.com/chromium/src@git-svn
Patch Set: Addressing Ben's comment Created 7 years, 11 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/event_transformation_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_DISPLAY_EVENT_TRANSFORMATION_HANDLER_H_
6 #define ASH_DISPLAY_EVENT_TRANSFORMATION_HANDLER_H_
7
8 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h"
10 #include "ui/base/events/event_handler.h"
11
12 namespace ash {
13
14 namespace internal {
15
16 // An event filter that transforms input event properties in extended desktop
17 // environment. It currently handles only ScrollEvents.
18 class ASH_EXPORT EventTransformationHandler : public ui::EventHandler {
19 public:
20 enum TransformationMode {
21 TRANSFORM_AUTO, // Transform events by the default amount.
22 // 1. Linear scaling w.r.t. the device scale factor.
23 // 2. Add 20% more for non-integrated displays.
24 TRANSFORM_NONE, // No transformation.
25 };
26
27 EventTransformationHandler();
28 virtual ~EventTransformationHandler();
29
30 void set_transformation_mode(TransformationMode transformation_mode) {
31 transformation_mode_ = transformation_mode;
32 }
33
34 // Overridden from ui::EventHandler.
35 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
36
37 private:
38 TransformationMode transformation_mode_;
39
40 DISALLOW_COPY_AND_ASSIGN(EventTransformationHandler);
41 };
42
43 } // namespace internal
44 } // namespace ash
45
46 #endif // ASH_DISPLAY_EVENT_TRANSFORMATION_HANDLER_H_
47
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/event_transformation_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698