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/panel_window_event_filter.h" | 5 #include "ash/wm/panel_window_event_filter.h" |
6 | 6 |
7 #include "ash/wm/window_util.h" | 7 #include "ash/wm/window_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 event->StopPropagation(); | 71 event->StopPropagation(); |
72 } | 72 } |
73 return; | 73 return; |
74 | 74 |
75 case ui::ET_MOUSE_RELEASED: | 75 case ui::ET_MOUSE_RELEASED: |
76 if (drag_state_ == DRAG_STARTED) { | 76 if (drag_state_ == DRAG_STARTED) { |
77 FinishDrag(); | 77 FinishDrag(); |
78 event->StopPropagation(); | 78 event->StopPropagation(); |
79 } else if (dragged_panel_ != NULL) { | 79 } else if (dragged_panel_ != NULL) { |
80 drag_state_ = DRAG_NONE; | 80 drag_state_ = DRAG_NONE; |
81 layout_manager_->ToggleMinimize(dragged_panel_); | |
82 dragged_panel_ = NULL; | 81 dragged_panel_ = NULL; |
83 event->StopPropagation(); | 82 event->StopPropagation(); |
84 } | 83 } |
85 return; | 84 return; |
86 default: | 85 default: |
87 return; | 86 return; |
88 } | 87 } |
89 } | 88 } |
90 | 89 |
91 void PanelWindowEventFilter::OnWindowDestroying(aura::Window* window) { | 90 void PanelWindowEventFilter::OnWindowDestroying(aura::Window* window) { |
(...skipping 15 matching lines...) Expand all Loading... |
107 } | 106 } |
108 | 107 |
109 void PanelWindowEventFilter::FinishDrag() { | 108 void PanelWindowEventFilter::FinishDrag() { |
110 layout_manager_->FinishDragging(); | 109 layout_manager_->FinishDragging(); |
111 drag_state_ = DRAG_NONE; | 110 drag_state_ = DRAG_NONE; |
112 dragged_panel_ = NULL; | 111 dragged_panel_ = NULL; |
113 } | 112 } |
114 | 113 |
115 } | 114 } |
116 } | 115 } |
OLD | NEW |