| 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/touch/touch_uma.h" | 10 #include "ash/touch/touch_uma.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 break; | 88 break; |
| 89 case ui::ET_MOUSE_PRESSED: { | 89 case ui::ET_MOUSE_PRESSED: { |
| 90 // Maximize behavior is implemented as post-target handling so the target | 90 // Maximize behavior is implemented as post-target handling so the target |
| 91 // can cancel it. | 91 // can cancel it. |
| 92 if (ui::EventCanceledDefaultHandling(*event)) { | 92 if (ui::EventCanceledDefaultHandling(*event)) { |
| 93 ToplevelWindowEventHandler::OnMouseEvent(event); | 93 ToplevelWindowEventHandler::OnMouseEvent(event); |
| 94 return; | 94 return; |
| 95 } | 95 } |
| 96 | 96 |
| 97 if (event->flags() & ui::EF_IS_DOUBLE_CLICK && | 97 if (event->flags() & ui::EF_IS_DOUBLE_CLICK && |
| 98 event->IsOnlyLeftMouseButton() && |
| 98 target->delegate()->GetNonClientComponent(event->location()) == | 99 target->delegate()->GetNonClientComponent(event->location()) == |
| 99 HTCAPTION && | 100 HTCAPTION && |
| 100 !ash::Shell::IsForcedMaximizeMode()) { | 101 !ash::Shell::IsForcedMaximizeMode()) { |
| 101 bool destroyed = false; | 102 bool destroyed = false; |
| 102 destroyed_ = &destroyed; | 103 destroyed_ = &destroyed; |
| 103 ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction( | 104 ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction( |
| 104 ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK); | 105 ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK); |
| 105 ToggleMaximizedState(target); | 106 ToggleMaximizedState(target); |
| 106 if (destroyed) | 107 if (destroyed) |
| 107 return; | 108 return; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 origin.y(), | 187 origin.y(), |
| 187 work_area.width(), | 188 work_area.width(), |
| 188 target->bounds().height())); | 189 target->bounds().height())); |
| 189 } | 190 } |
| 190 } | 191 } |
| 191 } | 192 } |
| 192 } | 193 } |
| 193 | 194 |
| 194 } // namespace internal | 195 } // namespace internal |
| 195 } // namespace ash | 196 } // namespace ash |
| OLD | NEW |