Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: ash/wm/workspace/workspace_event_handler.cc

Issue 13934007: Adding experimental maximize mode (behind a flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment and tabbed reference Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698