| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 gfx::Size GetHostSizeDIP() const; | 114 gfx::Size GetHostSizeDIP() const; |
| 115 | 115 |
| 116 // Correct the givin scale value if nessesary. | 116 // Correct the givin scale value if nessesary. |
| 117 void ValidateScale(float* scale); | 117 void ValidateScale(float* scale); |
| 118 | 118 |
| 119 // aura::EventFilter overrides: | 119 // aura::EventFilter overrides: |
| 120 virtual bool PreHandleKeyEvent(aura::Window* target, | 120 virtual bool PreHandleKeyEvent(aura::Window* target, |
| 121 ui::KeyEvent* event) OVERRIDE; | 121 ui::KeyEvent* event) OVERRIDE; |
| 122 virtual bool PreHandleMouseEvent(aura::Window* target, | 122 virtual bool PreHandleMouseEvent(aura::Window* target, |
| 123 ui::MouseEvent* event) OVERRIDE; | 123 ui::MouseEvent* event) OVERRIDE; |
| 124 virtual ui::TouchStatus PreHandleTouchEvent( | 124 virtual ui::EventResult PreHandleTouchEvent( |
| 125 aura::Window* target, | 125 aura::Window* target, |
| 126 ui::TouchEvent* event) OVERRIDE; | 126 ui::TouchEvent* event) OVERRIDE; |
| 127 virtual ui::EventResult PreHandleGestureEvent( | 127 virtual ui::EventResult PreHandleGestureEvent( |
| 128 aura::Window* target, | 128 aura::Window* target, |
| 129 ui::GestureEvent* event) OVERRIDE; | 129 ui::GestureEvent* event) OVERRIDE; |
| 130 | 130 |
| 131 aura::RootWindow* root_window_; | 131 aura::RootWindow* root_window_; |
| 132 | 132 |
| 133 // True if the magnified window is in motion of zooming or un-zooming effect. | 133 // True if the magnified window is in motion of zooming or un-zooming effect. |
| 134 // Otherwise, false. | 134 // Otherwise, false. |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 if (current_root != root_window_) | 481 if (current_root != root_window_) |
| 482 SwitchTargetRootWindow(current_root); | 482 SwitchTargetRootWindow(current_root); |
| 483 | 483 |
| 484 OnMouseMove(event->root_location()); | 484 OnMouseMove(event->root_location()); |
| 485 } | 485 } |
| 486 } | 486 } |
| 487 | 487 |
| 488 return false; | 488 return false; |
| 489 } | 489 } |
| 490 | 490 |
| 491 ui::TouchStatus MagnificationControllerImpl::PreHandleTouchEvent( | 491 ui::EventResult MagnificationControllerImpl::PreHandleTouchEvent( |
| 492 aura::Window* target, | 492 aura::Window* target, |
| 493 ui::TouchEvent* event) { | 493 ui::TouchEvent* event) { |
| 494 return ui::TOUCH_STATUS_UNKNOWN; | 494 return ui::ER_UNHANDLED; |
| 495 } | 495 } |
| 496 | 496 |
| 497 ui::EventResult MagnificationControllerImpl::PreHandleGestureEvent( | 497 ui::EventResult MagnificationControllerImpl::PreHandleGestureEvent( |
| 498 aura::Window* target, | 498 aura::Window* target, |
| 499 ui::GestureEvent* event) { | 499 ui::GestureEvent* event) { |
| 500 return ui::ER_UNHANDLED; | 500 return ui::ER_UNHANDLED; |
| 501 } | 501 } |
| 502 | 502 |
| 503 //////////////////////////////////////////////////////////////////////////////// | 503 //////////////////////////////////////////////////////////////////////////////// |
| 504 // MagnificationController: | 504 // MagnificationController: |
| 505 | 505 |
| 506 // static | 506 // static |
| 507 MagnificationController* MagnificationController::CreateInstance() { | 507 MagnificationController* MagnificationController::CreateInstance() { |
| 508 return new MagnificationControllerImpl(); | 508 return new MagnificationControllerImpl(); |
| 509 } | 509 } |
| 510 | 510 |
| 511 } // namespace internal | 511 } // namespace internal |
| 512 } // namespace ash | 512 } // namespace ash |
| OLD | NEW |