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. |