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

Unified Diff: ash/wm/frame_painter.h

Issue 9958039: Changes the maximize button to only minimize for panels. This resulted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Spelling Created 8 years, 9 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/frame_painter.h
diff --git a/ash/wm/frame_painter.h b/ash/wm/frame_painter.h
index ca6b47b007b6a610b0151586d7d917c3dfaf40b1..ab22165ed3c6cc67f805a7f607777913ace6d27a 100644
--- a/ash/wm/frame_painter.h
+++ b/ash/wm/frame_painter.h
@@ -54,14 +54,21 @@ class ASH_EXPORT FramePainter : public aura::WindowObserver,
INACTIVE
};
+ // What happens when the |size_button_| is pressed.
+ enum SizeButtonBehavior {
+ SIZE_BUTTON_MINIMIZES,
+ SIZE_BUTTON_MAXIMIZES
+ };
+
FramePainter();
virtual ~FramePainter();
// |frame| and buttons are used for layout and are not owned.
void Init(views::Widget* frame,
views::View* window_icon,
- views::ImageButton* maximize_button,
- views::ImageButton* close_button);
+ views::ImageButton* size_button,
+ views::ImageButton* close_button,
+ SizeButtonBehavior behavior);
// Helpers for views::NonClientFrameView implementations.
gfx::Rect GetBoundsForClientView(int top_height,
@@ -128,7 +135,7 @@ class ASH_EXPORT FramePainter : public aura::WindowObserver,
// Not owned
views::Widget* frame_;
views::View* window_icon_; // May be NULL.
- views::ImageButton* maximize_button_;
+ views::ImageButton* size_button_;
views::ImageButton* close_button_;
aura::Window* window_;
@@ -151,6 +158,8 @@ class ASH_EXPORT FramePainter : public aura::WindowObserver,
gfx::Rect header_frame_bounds_;
scoped_ptr<ui::SlideAnimation> crossfade_animation_;
+ SizeButtonBehavior size_button_behavior_;
+
DISALLOW_COPY_AND_ASSIGN(FramePainter);
};

Powered by Google App Engine
This is Rietveld 408576698