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

Unified Diff: ash/wm/custom_frame_view_ash.cc

Issue 10883069: Added restore functionality for maximize full/left/right (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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/custom_frame_view_ash.cc
diff --git a/ash/wm/custom_frame_view_ash.cc b/ash/wm/custom_frame_view_ash.cc
index aa0186d3e3ae6ba7aa324b3732b2e703a92ce9f7..bf173893184948517b3fc4885316ac34106d37de 100644
--- a/ash/wm/custom_frame_view_ash.cc
+++ b/ash/wm/custom_frame_view_ash.cc
@@ -6,6 +6,7 @@
#include "ash/wm/frame_painter.h"
#include "ash/wm/workspace/frame_maximize_button.h"
+#include "ash/wm/workspace/workspace_event_filter.h"
#include "grit/ui_resources.h"
#include "grit/ui_strings.h" // Accessibility names
#include "ui/base/l10n/l10n_util.h"
@@ -148,10 +149,7 @@ void CustomFrameViewAsh::ButtonPressed(views::Button* sender,
if (sender == maximize_button_) {
// The maximize button may move out from under the cursor.
ResetWindowControls();
- if (frame_->IsMaximized())
- frame_->Restore();
- else
- frame_->Maximize();
+ ash::ToggleMaximizedState(frame_->GetNativeWindow());
// |this| may be deleted - some windows delete their frames on maximize.
} else if (sender == close_button_) {
frame_->Close();

Powered by Google App Engine
This is Rietveld 408576698