Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ash / display / event_transformation_handler.cc
index aaac56c..ef545fc 100644 (file)
@@ -6,23 +6,21 @@
 
 #include <cmath>
 
-#include "ash/screen_ash.h"
 #include "ash/shell.h"
 #include "ash/wm/coordinate_conversion.h"
 #include "ash/wm/window_util.h"
-#include "ui/aura/root_window.h"
 #include "ui/aura/window.h"
+#include "ui/aura/window_event_dispatcher.h"
 #include "ui/compositor/dip_util.h"
 #include "ui/events/event.h"
 #include "ui/gfx/display.h"
 #include "ui/gfx/screen.h"
 
 #if defined(OS_CHROMEOS)
-#include "chromeos/display/output_configurator.h"
+#include "ui/display/chromeos/display_configurator.h"
 #endif  // defined(OS_CHROMEOS)
 
 namespace ash {
-namespace internal {
 namespace {
 
 // Boost factor for non-integrated displays.
@@ -61,18 +59,19 @@ void EventTransformationHandler::OnScrollEvent(ui::ScrollEvent* event) {
 // the sqrt of
 // (mirror_width * mirror_height) / (native_width * native_height)
 void EventTransformationHandler::OnTouchEvent(ui::TouchEvent* event) {
-  using chromeos::OutputConfigurator;
-  OutputConfigurator* output_configurator =
-      ash::Shell::GetInstance()->output_configurator();
+  using ui::DisplayConfigurator;
+  DisplayConfigurator* display_configurator =
+      ash::Shell::GetInstance()->display_configurator();
 
-  // Check output_configurator's output_state instead of checking
+  // Check display_configurator's output_state instead of checking
   // DisplayManager::IsMirrored() because the compositor based mirroring
   // won't cause the scaling issue.
-  if (output_configurator->output_state() != chromeos::STATE_DUAL_MIRROR)
+  if (display_configurator->display_state() !=
+      ui::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR)
     return;
 
   const std::map<int, float>& area_ratio_map =
-      output_configurator->GetMirroredDisplayAreaRatioMap();
+      display_configurator->GetMirroredDisplayAreaRatioMap();
 
   // TODO(miletus): When there are more than 1 touchscreen (e.g. Link connected
   // to an external touchscreen), the correct way to do is to have a way
@@ -91,5 +90,4 @@ void EventTransformationHandler::OnTouchEvent(ui::TouchEvent* event) {
 }
 #endif  // defined(OS_CHROMEOS)
 
-}  // namespace internal
 }  // namespace ash