summaryrefslogtreecommitdiffstats
path: root/ash/wm/workspace/frame_maximize_button.cc
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-02 07:53:47 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-02 07:53:47 +0000
commita4016f15e7abb41735dc3eec9e4d9dcb4b0d4fa5 (patch)
treef559e0dcd34863c861ccad534a9ad7eb88bcfaf2 /ash/wm/workspace/frame_maximize_button.cc
parent7abe41339b91e2c75f4b2b811c48794280d0116c (diff)
downloadchromium_src-a4016f15e7abb41735dc3eec9e4d9dcb4b0d4fa5.zip
chromium_src-a4016f15e7abb41735dc3eec9e4d9dcb4b0d4fa5.tar.gz
chromium_src-a4016f15e7abb41735dc3eec9e4d9dcb4b0d4fa5.tar.bz2
Adding experimental maximize mode (behind a flag)
This experimental feature is behind a flag and allows our user interface designers to experiment with an always maximized window mode. It also removes certain context menu options which make no sense in that mode anymore. No goals for this CL are: - The minimal / maximal window size properties of V2 apps will get ignored, and the apps will always get maximized. - Rather then not creating buttons in the first place, they only get hidden to keep the changes to the code to a minimum. Note: Since this feature is entirely experimental + behind a flag + subject to change + does only contain minor behavioral changes, there are no unit tests for this at this time. BUG=230510 TEST=visual (browser, hosted apps, V1 apps) Review URL: https://chromiumcodereview.appspot.com/13934007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/workspace/frame_maximize_button.cc')
-rw-r--r--ash/wm/workspace/frame_maximize_button.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index d258b378..0329e3f 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.