| OLD | NEW |
| 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 #ifndef ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ | 5 #ifndef ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ |
| 6 #define ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ | 6 #define ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // Updates the TouchTransformer for touch device and pushes the new | 30 // Updates the TouchTransformer for touch device and pushes the new |
| 31 // TouchTransformer into device manager. | 31 // TouchTransformer into device manager. |
| 32 void UpdateTouchTransformer() const; | 32 void UpdateTouchTransformer() const; |
| 33 | 33 |
| 34 // WindowTreeHostManager::Observer: | 34 // WindowTreeHostManager::Observer: |
| 35 void OnDisplaysInitialized() override; | 35 void OnDisplaysInitialized() override; |
| 36 void OnDisplayConfigurationChanged() override; | 36 void OnDisplayConfigurationChanged() override; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, | 39 friend class TouchTransformerControllerTest; |
| 40 MirrorModeLetterboxing); | |
| 41 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, | |
| 42 MirrorModePillarboxing); | |
| 43 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, SoftwareMirrorMode); | |
| 44 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, ExtendedMode); | |
| 45 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, TouchRadiusScale); | |
| 46 | 40 |
| 47 // Returns a transform that will be used to change an event's location from | 41 // Returns a transform that will be used to change an event's location from |
| 48 // the touchscreen's coordinate system into |display|'s coordinate system. | 42 // the touchscreen's coordinate system into |display|'s coordinate system. |
| 49 // The transform is also responsible for properly scaling the display if the | 43 // The transform is also responsible for properly scaling the display if the |
| 50 // display supports panel fitting. | 44 // display supports panel fitting. |
| 51 // | 45 // |
| 52 // On X11 events are reported in framebuffer coordinate space, so the | 46 // On X11 events are reported in framebuffer coordinate space, so the |
| 53 // |framebuffer_size| is used for scaling. | 47 // |framebuffer_size| is used for scaling. |
| 54 // On Ozone events are reported in the touchscreen's resolution, so | 48 // On Ozone events are reported in the touchscreen's resolution, so |
| 55 // |touch_display| is used to determine the size and scale the event. | 49 // |touch_display| is used to determine the size and scale the event. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 81 int64_t target_display_id, | 75 int64_t target_display_id, |
| 82 const display::ManagedDisplayInfo& touch_display, | 76 const display::ManagedDisplayInfo& touch_display, |
| 83 const display::ManagedDisplayInfo& target_display) const; | 77 const display::ManagedDisplayInfo& target_display) const; |
| 84 | 78 |
| 85 DISALLOW_COPY_AND_ASSIGN(TouchTransformerController); | 79 DISALLOW_COPY_AND_ASSIGN(TouchTransformerController); |
| 86 }; | 80 }; |
| 87 | 81 |
| 88 } // namespace ash | 82 } // namespace ash |
| 89 | 83 |
| 90 #endif // ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ | 84 #endif // ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ |
| OLD | NEW |