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

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

Issue 10836176: Fixing drag out of maximize dialog button problem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | 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/frame_maximize_button.h" 5 #include "ash/wm/workspace/frame_maximize_button.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Tell our menu to close. 158 // Tell our menu to close.
159 maximizer_.reset(); 159 maximizer_.reset();
160 snap_type_ = snap_type; 160 snap_type_ = snap_type;
161 // Since Snap might destroy |this|, but the snap_sizer needs to be destroyed, 161 // Since Snap might destroy |this|, but the snap_sizer needs to be destroyed,
162 // The ownership of the snap_sizer is taken now. 162 // The ownership of the snap_sizer is taken now.
163 scoped_ptr<SnapSizer> snap_sizer(snap_sizer_.release()); 163 scoped_ptr<SnapSizer> snap_sizer(snap_sizer_.release());
164 Snap(*snap_sizer.get()); 164 Snap(*snap_sizer.get());
165 } 165 }
166 166
167 void FrameMaximizeButton::DestroyMaximizeMenu() { 167 void FrameMaximizeButton::DestroyMaximizeMenu() {
168 maximizer_.reset(); 168 Cancel(false);
169 } 169 }
170 170
171 void FrameMaximizeButton::OnWindowBoundsChanged( 171 void FrameMaximizeButton::OnWindowBoundsChanged(
172 aura::Window* window, 172 aura::Window* window,
173 const gfx::Rect& old_bounds, 173 const gfx::Rect& old_bounds,
174 const gfx::Rect& new_bounds) { 174 const gfx::Rect& new_bounds) {
175 Cancel(false); 175 Cancel(false);
176 } 176 }
177 177
178 void FrameMaximizeButton::OnWindowDestroying(aura::Window* window) { 178 void FrameMaximizeButton::OnWindowDestroying(aura::Window* window) {
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 break; 490 break;
491 case SNAP_RESTORE: 491 case SNAP_RESTORE:
492 frame_->GetWidget()->Restore(); 492 frame_->GetWidget()->Restore();
493 break; 493 break;
494 case SNAP_NONE: 494 case SNAP_NONE:
495 NOTREACHED(); 495 NOTREACHED();
496 } 496 }
497 } 497 }
498 498
499 } // namespace ash 499 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698