| 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/resize_shadow_controller.h" | 8 #include "ash/wm/resize_shadow_controller.h" |
| 9 #include "ash/wm/window_resizer.h" | 9 #include "ash/wm/window_resizer.h" |
| 10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 ScopedWindowResizer(ToplevelWindowEventHandler* handler, | 93 ScopedWindowResizer(ToplevelWindowEventHandler* handler, |
| 94 WindowResizer* resizer); | 94 WindowResizer* resizer); |
| 95 virtual ~ScopedWindowResizer(); | 95 virtual ~ScopedWindowResizer(); |
| 96 | 96 |
| 97 // Returns true if the drag moves the window and does not resize. | 97 // Returns true if the drag moves the window and does not resize. |
| 98 bool IsMove() const; | 98 bool IsMove() const; |
| 99 | 99 |
| 100 WindowResizer* resizer() { return resizer_.get(); } | 100 WindowResizer* resizer() { return resizer_.get(); } |
| 101 | 101 |
| 102 // WindowObserver overrides: | 102 // WindowObserver overrides: |
| 103 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 103 virtual void OnWindowDestroying(aura::Window* window) override; |
| 104 | 104 |
| 105 // WindowStateObserver overrides: | 105 // WindowStateObserver overrides: |
| 106 virtual void OnPreWindowStateTypeChange(wm::WindowState* window_state, | 106 virtual void OnPreWindowStateTypeChange(wm::WindowState* window_state, |
| 107 wm::WindowStateType type) OVERRIDE; | 107 wm::WindowStateType type) override; |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 ToplevelWindowEventHandler* handler_; | 110 ToplevelWindowEventHandler* handler_; |
| 111 scoped_ptr<WindowResizer> resizer_; | 111 scoped_ptr<WindowResizer> resizer_; |
| 112 | 112 |
| 113 DISALLOW_COPY_AND_ASSIGN(ScopedWindowResizer); | 113 DISALLOW_COPY_AND_ASSIGN(ScopedWindowResizer); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 ToplevelWindowEventHandler::ScopedWindowResizer::ScopedWindowResizer( | 116 ToplevelWindowEventHandler::ScopedWindowResizer::ScopedWindowResizer( |
| 117 ToplevelWindowEventHandler* handler, | 117 ToplevelWindowEventHandler* handler, |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 default: | 604 default: |
| 605 NOTREACHED(); | 605 NOTREACHED(); |
| 606 } | 606 } |
| 607 } | 607 } |
| 608 | 608 |
| 609 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { | 609 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { |
| 610 CompleteDrag(DRAG_RESIZER_WINDOW_DESTROYED); | 610 CompleteDrag(DRAG_RESIZER_WINDOW_DESTROYED); |
| 611 } | 611 } |
| 612 | 612 |
| 613 } // namespace ash | 613 } // namespace ash |
| OLD | NEW |