| 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/wm/toplevel_window_event_handler.h" | 5 #include "ash/wm/toplevel_window_event_handler.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm/default_window_resizer.h" | 8 #include "ash/wm/default_window_resizer.h" |
| 9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
| 10 #include "ash/wm/resize_shadow_controller.h" | 10 #include "ash/wm/resize_shadow_controller.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 break; | 140 break; |
| 141 } | 141 } |
| 142 return ui::ER_UNHANDLED; | 142 return ui::ER_UNHANDLED; |
| 143 } | 143 } |
| 144 | 144 |
| 145 ui::EventResult ToplevelWindowEventHandler::OnScrollEvent( | 145 ui::EventResult ToplevelWindowEventHandler::OnScrollEvent( |
| 146 ui::ScrollEvent* event) { | 146 ui::ScrollEvent* event) { |
| 147 return ui::ER_UNHANDLED; | 147 return ui::ER_UNHANDLED; |
| 148 } | 148 } |
| 149 | 149 |
| 150 ui::TouchStatus ToplevelWindowEventHandler::OnTouchEvent( | 150 ui::EventResult ToplevelWindowEventHandler::OnTouchEvent( |
| 151 ui::TouchEvent* event) { | 151 ui::TouchEvent* event) { |
| 152 return ui::TOUCH_STATUS_UNKNOWN; | 152 return ui::ER_UNHANDLED; |
| 153 } | 153 } |
| 154 | 154 |
| 155 ui::EventResult ToplevelWindowEventHandler::OnGestureEvent( | 155 ui::EventResult ToplevelWindowEventHandler::OnGestureEvent( |
| 156 ui::GestureEvent* event) { | 156 ui::GestureEvent* event) { |
| 157 aura::Window* target = static_cast<aura::Window*>(event->target()); | 157 aura::Window* target = static_cast<aura::Window*>(event->target()); |
| 158 switch (event->type()) { | 158 switch (event->type()) { |
| 159 case ui::ET_GESTURE_SCROLL_BEGIN: { | 159 case ui::ET_GESTURE_SCROLL_BEGIN: { |
| 160 int component = | 160 int component = |
| 161 target->delegate()->GetNonClientComponent(event->location()); | 161 target->delegate()->GetNonClientComponent(event->location()); |
| 162 if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0) { | 162 if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0) { |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { | 434 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { |
| 435 // We explicitly don't invoke RevertDrag() since that may do things to window. | 435 // We explicitly don't invoke RevertDrag() since that may do things to window. |
| 436 // Instead we destroy the resizer. | 436 // Instead we destroy the resizer. |
| 437 window_resizer_.reset(); | 437 window_resizer_.reset(); |
| 438 | 438 |
| 439 // End the move loop. This does nothing if we're not in a move loop. | 439 // End the move loop. This does nothing if we're not in a move loop. |
| 440 EndMoveLoop(); | 440 EndMoveLoop(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 } // namespace ash | 443 } // namespace ash |
| OLD | NEW |