| 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/workspace/workspace_event_handler.h" | 5 #include "ash/wm/workspace/workspace_event_handler.h" |
| 6 | 6 |
| 7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
| 8 #include "ash/wm/property_util.h" | 8 #include "ash/wm/property_util.h" |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "ash/wm/workspace/workspace_window_resizer.h" | 10 #include "ash/wm/workspace/workspace_window_resizer.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 multi_window_resize_controller_.Show(target, component, | 73 multi_window_resize_controller_.Show(target, component, |
| 74 event->location()); | 74 event->location()); |
| 75 break; | 75 break; |
| 76 } | 76 } |
| 77 case ui::ET_MOUSE_ENTERED: | 77 case ui::ET_MOUSE_ENTERED: |
| 78 break; | 78 break; |
| 79 case ui::ET_MOUSE_CAPTURE_CHANGED: | 79 case ui::ET_MOUSE_CAPTURE_CHANGED: |
| 80 case ui::ET_MOUSE_EXITED: | 80 case ui::ET_MOUSE_EXITED: |
| 81 break; | 81 break; |
| 82 case ui::ET_MOUSE_PRESSED: { | 82 case ui::ET_MOUSE_PRESSED: { |
| 83 // Maximize behavior is implemented as post-target handling so the target |
| 84 // can cancel it. |
| 85 if (ui::EventCanceledDefaultHandling(*event)) |
| 86 return ToplevelWindowEventHandler::OnMouseEvent(event); |
| 87 |
| 83 if (event->flags() & ui::EF_IS_DOUBLE_CLICK && | 88 if (event->flags() & ui::EF_IS_DOUBLE_CLICK && |
| 84 target->delegate()->GetNonClientComponent(event->location()) == | 89 target->delegate()->GetNonClientComponent(event->location()) == |
| 85 HTCAPTION) { | 90 HTCAPTION) { |
| 86 bool destroyed = false; | 91 bool destroyed = false; |
| 87 destroyed_ = &destroyed; | 92 destroyed_ = &destroyed; |
| 88 ToggleMaximizedState(target); | 93 ToggleMaximizedState(target); |
| 89 if (destroyed) | 94 if (destroyed) |
| 90 return ui::ER_UNHANDLED; | 95 return ui::ER_UNHANDLED; |
| 91 destroyed_ = NULL; | 96 destroyed_ = NULL; |
| 92 } | 97 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 target->bounds().y(), | 165 target->bounds().y(), |
| 161 work_area.width(), | 166 work_area.width(), |
| 162 target->bounds().height())); | 167 target->bounds().height())); |
| 163 } | 168 } |
| 164 } | 169 } |
| 165 } | 170 } |
| 166 } | 171 } |
| 167 | 172 |
| 168 } // namespace internal | 173 } // namespace internal |
| 169 } // namespace ash | 174 } // namespace ash |
| OLD | NEW |