| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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/display/event_transformation_handler.h" | 5 #include "ash/display/event_transformation_handler.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/wm/coordinate_conversion.h" | 10 #include "ash/wm/coordinate_conversion.h" |
| 11 #include "ash/wm/window_util.h" | 11 #include "ash/wm/window_util.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/aura/window_event_dispatcher.h" | 13 #include "ui/aura/window_event_dispatcher.h" |
| 14 #include "ui/compositor/dip_util.h" | 14 #include "ui/compositor/dip_util.h" |
| 15 #include "ui/events/event.h" | 15 #include "ui/events/event.h" |
| 16 #include "ui/gfx/display.h" | 16 #include "ui/gfx/display.h" |
| 17 #include "ui/gfx/screen.h" | 17 #include "ui/gfx/screen.h" |
| 18 | 18 |
| 19 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
| 20 #include "ui/display/chromeos/output_configurator.h" | 20 #include "ui/display/chromeos/output_configurator.h" |
| 21 #endif // defined(OS_CHROMEOS) | 21 #endif // defined(OS_CHROMEOS) |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 namespace internal { | |
| 25 namespace { | 24 namespace { |
| 26 | 25 |
| 27 // Boost factor for non-integrated displays. | 26 // Boost factor for non-integrated displays. |
| 28 const float kBoostForNonIntegrated = 1.20f; | 27 const float kBoostForNonIntegrated = 1.20f; |
| 29 } | 28 } |
| 30 | 29 |
| 31 EventTransformationHandler::EventTransformationHandler() | 30 EventTransformationHandler::EventTransformationHandler() |
| 32 : transformation_mode_(TRANSFORM_AUTO) { | 31 : transformation_mode_(TRANSFORM_AUTO) { |
| 33 } | 32 } |
| 34 | 33 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 << " touch display found"; | 82 << " touch display found"; |
| 84 return; | 83 return; |
| 85 } | 84 } |
| 86 | 85 |
| 87 float area_ratio_sqrt = std::sqrt(area_ratio_map.begin()->second); | 86 float area_ratio_sqrt = std::sqrt(area_ratio_map.begin()->second); |
| 88 event->set_radius_x(event->radius_x() * area_ratio_sqrt); | 87 event->set_radius_x(event->radius_x() * area_ratio_sqrt); |
| 89 event->set_radius_y(event->radius_y() * area_ratio_sqrt); | 88 event->set_radius_y(event->radius_y() * area_ratio_sqrt); |
| 90 } | 89 } |
| 91 #endif // defined(OS_CHROMEOS) | 90 #endif // defined(OS_CHROMEOS) |
| 92 | 91 |
| 93 } // namespace internal | |
| 94 } // namespace ash | 92 } // namespace ash |
| OLD | NEW |