| 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/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
| 10 #include "ash/wm/property_util.h" | 10 #include "ash/wm/property_util.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 case ui::ET_MOUSE_PRESSED: { | 84 case ui::ET_MOUSE_PRESSED: { |
| 85 // Maximize behavior is implemented as post-target handling so the target | 85 // Maximize behavior is implemented as post-target handling so the target |
| 86 // can cancel it. | 86 // can cancel it. |
| 87 if (ui::EventCanceledDefaultHandling(*event)) { | 87 if (ui::EventCanceledDefaultHandling(*event)) { |
| 88 ToplevelWindowEventHandler::OnMouseEvent(event); | 88 ToplevelWindowEventHandler::OnMouseEvent(event); |
| 89 return; | 89 return; |
| 90 } | 90 } |
| 91 | 91 |
| 92 if (event->flags() & ui::EF_IS_DOUBLE_CLICK && | 92 if (event->flags() & ui::EF_IS_DOUBLE_CLICK && |
| 93 target->delegate()->GetNonClientComponent(event->location()) == | 93 target->delegate()->GetNonClientComponent(event->location()) == |
| 94 HTCAPTION) { | 94 HTCAPTION && |
| 95 !ash::Shell::IsForcedMaximizeMode()) { |
| 95 bool destroyed = false; | 96 bool destroyed = false; |
| 96 destroyed_ = &destroyed; | 97 destroyed_ = &destroyed; |
| 97 ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction( | 98 ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction( |
| 98 ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK); | 99 ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK); |
| 99 ToggleMaximizedState(target); | 100 ToggleMaximizedState(target); |
| 100 if (destroyed) | 101 if (destroyed) |
| 101 return; | 102 return; |
| 102 destroyed_ = NULL; | 103 destroyed_ = NULL; |
| 103 } | 104 } |
| 104 multi_window_resize_controller_.Hide(); | 105 multi_window_resize_controller_.Hide(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 target->bounds().y(), | 168 target->bounds().y(), |
| 168 work_area.width(), | 169 work_area.width(), |
| 169 target->bounds().height())); | 170 target->bounds().height())); |
| 170 } | 171 } |
| 171 } | 172 } |
| 172 } | 173 } |
| 173 } | 174 } |
| 174 | 175 |
| 175 } // namespace internal | 176 } // namespace internal |
| 176 } // namespace ash | 177 } // namespace ash |
| OLD | NEW |