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

Side by Side Diff: ash/touch/touch_transformer_controller.h

Issue 280833002: Re-land "Issue 191223007: Move touch CTM from X into Chrome" (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: adding missing file again Created 6 years, 7 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/shell.cc ('k') | ash/touch/touch_transformer_controller.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 2014 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_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_
6 #define ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/display/display_controller.h"
10 #include "ui/gfx/transform.h"
11
12 namespace ash {
13
14 // TouchTransformerController listens to display configuration change
15 // and updates the touch transformation for touch displays.
16 class ASH_EXPORT TouchTransformerController
17 : public DisplayController::Observer {
18 public:
19 TouchTransformerController();
20 virtual ~TouchTransformerController();
21
22 // Updates the TouchTransformer for touch device and pushes the new
23 // TouchTransformer into device manager.
24 void UpdateTouchTransformer() const;
25
26 // DisplayController::Observer:
27 virtual void OnDisplaysInitialized() OVERRIDE;
28 virtual void OnDisplayConfigurationChanged() OVERRIDE;
29
30 private:
31 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest,
32 TouchTransformerMirrorModeLetterboxing);
33 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest,
34 TouchTransformerMirrorModePillarboxing);
35 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest,
36 TouchTransformerExtendedMode);
37
38 bool ShouldComputeMirrorModeTouchTransformer(
39 const DisplayInfo& touch_display) const ;
40
41 gfx::Transform GetMirrorModeTouchTransformer(
42 const DisplayInfo& touch_display) const;
43
44 gfx::Transform GetExtendedModeTouchTransformer(
45 const DisplayInfo& touch_display, const gfx::Size& fb_size) const;
46
47 // For unittests only.
48 bool force_compute_mirror_mode_touch_transformer_;
49
50 DISALLOW_COPY_AND_ASSIGN(TouchTransformerController);
51 };
52
53 } // namespace ash
54
55 #endif // ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/touch/touch_transformer_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698