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 "ui/aura/event_filter.h" | 8 #include "ui/aura/event_filter.h" |
9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
10 #include "ui/aura/shared/compound_event_filter.h" | 10 #include "ui/aura/shared/compound_event_filter.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Correct the givin scale value if nessesary. | 97 // Correct the givin scale value if nessesary. |
98 void ValidateScale(float* scale); | 98 void ValidateScale(float* scale); |
99 | 99 |
100 // aura::EventFilter overrides: | 100 // aura::EventFilter overrides: |
101 virtual bool PreHandleKeyEvent(aura::Window* target, | 101 virtual bool PreHandleKeyEvent(aura::Window* target, |
102 ui::KeyEvent* event) OVERRIDE; | 102 ui::KeyEvent* event) OVERRIDE; |
103 virtual bool PreHandleMouseEvent(aura::Window* target, | 103 virtual bool PreHandleMouseEvent(aura::Window* target, |
104 ui::MouseEvent* event) OVERRIDE; | 104 ui::MouseEvent* event) OVERRIDE; |
105 virtual ui::TouchStatus PreHandleTouchEvent( | 105 virtual ui::TouchStatus PreHandleTouchEvent( |
106 aura::Window* target, | 106 aura::Window* target, |
107 ui::TouchEventImpl* event) OVERRIDE; | 107 ui::TouchEvent* event) OVERRIDE; |
108 virtual ui::GestureStatus PreHandleGestureEvent( | 108 virtual ui::GestureStatus PreHandleGestureEvent( |
109 aura::Window* target, | 109 aura::Window* target, |
110 ui::GestureEventImpl* event) OVERRIDE; | 110 ui::GestureEventImpl* event) OVERRIDE; |
111 | 111 |
112 aura::RootWindow* root_window_; | 112 aura::RootWindow* root_window_; |
113 | 113 |
114 // True if the magnified window is in motion of zooming or un-zooming effect. | 114 // True if the magnified window is in motion of zooming or un-zooming effect. |
115 // Otherwise, false. | 115 // Otherwise, false. |
116 bool is_on_zooming_; | 116 bool is_on_zooming_; |
117 | 117 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 OnMouseMove(event->root_location()); | 442 OnMouseMove(event->root_location()); |
443 } | 443 } |
444 } | 444 } |
445 | 445 |
446 return false; | 446 return false; |
447 } | 447 } |
448 | 448 |
449 ui::TouchStatus MagnificationControllerImpl::PreHandleTouchEvent( | 449 ui::TouchStatus MagnificationControllerImpl::PreHandleTouchEvent( |
450 aura::Window* target, | 450 aura::Window* target, |
451 ui::TouchEventImpl* event) { | 451 ui::TouchEvent* event) { |
452 return ui::TOUCH_STATUS_UNKNOWN; | 452 return ui::TOUCH_STATUS_UNKNOWN; |
453 } | 453 } |
454 | 454 |
455 ui::GestureStatus MagnificationControllerImpl::PreHandleGestureEvent( | 455 ui::GestureStatus MagnificationControllerImpl::PreHandleGestureEvent( |
456 aura::Window* target, | 456 aura::Window* target, |
457 ui::GestureEventImpl* event) { | 457 ui::GestureEventImpl* event) { |
458 return ui::GESTURE_STATUS_UNKNOWN; | 458 return ui::GESTURE_STATUS_UNKNOWN; |
459 } | 459 } |
460 | 460 |
461 //////////////////////////////////////////////////////////////////////////////// | 461 //////////////////////////////////////////////////////////////////////////////// |
462 // MagnificationController: | 462 // MagnificationController: |
463 | 463 |
464 // static | 464 // static |
465 MagnificationController* MagnificationController::CreateInstance() { | 465 MagnificationController* MagnificationController::CreateInstance() { |
466 return new MagnificationControllerImpl(); | 466 return new MagnificationControllerImpl(); |
467 } | 467 } |
468 | 468 |
469 } // namespace internal | 469 } // namespace internal |
470 } // namespace ash | 470 } // namespace ash |
OLD | NEW |