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

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: Added comment and tabbed reference 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
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.h ('k') | ash/wm/workspace/workspace_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
+ return;
+
+ views::View::SetVisible(visible);
+}
+
void FrameMaximizeButton::ProcessStartEvent(const ui::LocatedEvent& event) {
DCHECK(is_snap_enabled_);
// Prepare the help menu.
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.h ('k') | ash/wm/workspace/workspace_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698