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

Unified Diff: ash/wm/workspace/frame_maximize_button.cc

Issue 13934007: Adding experimental maximize mode (behind a flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Step back and a few changes Created 7 years, 8 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/workspace/frame_maximize_button.cc
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index d258b37894578ee3bc8d6932f903e1d6bc9d6a7f..0329e3f6d4668e5342a2586f4d061dd017991c69 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -91,6 +91,9 @@ FrameMaximizeButton::FrameMaximizeButton(views::ButtonListener* listener,
bubble_appearance_delay_ms_(kBubbleAppearanceDelayMS) {
// TODO(sky): nuke this. It's temporary while we don't have good images.
SetImageAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
+
+ if (ash::Shell::IsForcedMaximizeMode())
+ views::View::SetVisible(false);
}
FrameMaximizeButton::~FrameMaximizeButton() {
@@ -306,6 +309,14 @@ void FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
ImageButton::OnGestureEvent(event);
}
+void FrameMaximizeButton::SetVisible(bool visible) {
+ // In the enforced maximized mode we do not allow to be made visible.
+ if (ash::Shell::IsForcedMaximizeMode())
sky 2013/05/01 04:32:04 Is there a reason you went this route rather than
Mr4D (OOO till 08-26) 2013/05/01 17:57:23 There are multiple frames which use this button (a
sky 2013/05/01 21:01:56 Which code is easier to understand, what you have
Mr4D (OOO till 08-26) 2013/05/01 22:48:49 This makes sure that no one ever will shows this b
+ return;
+
+ views::View::SetVisible(visible);
+}
+
void FrameMaximizeButton::ProcessStartEvent(const ui::LocatedEvent& event) {
DCHECK(is_snap_enabled_);
// Prepare the help menu.

Powered by Google App Engine
This is Rietveld 408576698