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

Side by Side Diff: ui/views/window/custom_frame_view.h

Issue 554183002: Update the maximize button when size constraints change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update NativeWidgetMac. Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/widget_unittest.cc ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ 5 #ifndef UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_
6 #define UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ 6 #define UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 30 matching lines...) Expand all
41 // Overridden from NonClientFrameView: 41 // Overridden from NonClientFrameView:
42 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 42 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
43 virtual gfx::Rect GetWindowBoundsForClientBounds( 43 virtual gfx::Rect GetWindowBoundsForClientBounds(
44 const gfx::Rect& client_bounds) const OVERRIDE; 44 const gfx::Rect& client_bounds) const OVERRIDE;
45 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 45 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
46 virtual void GetWindowMask(const gfx::Size& size, 46 virtual void GetWindowMask(const gfx::Size& size,
47 gfx::Path* window_mask) OVERRIDE; 47 gfx::Path* window_mask) OVERRIDE;
48 virtual void ResetWindowControls() OVERRIDE; 48 virtual void ResetWindowControls() OVERRIDE;
49 virtual void UpdateWindowIcon() OVERRIDE; 49 virtual void UpdateWindowIcon() OVERRIDE;
50 virtual void UpdateWindowTitle() OVERRIDE; 50 virtual void UpdateWindowTitle() OVERRIDE;
51 virtual void SizeConstraintsChanged() OVERRIDE;
51 52
52 // Overridden from View: 53 // Overridden from View:
53 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 54 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
54 virtual void Layout() OVERRIDE; 55 virtual void Layout() OVERRIDE;
55 virtual gfx::Size GetPreferredSize() const OVERRIDE; 56 virtual gfx::Size GetPreferredSize() const OVERRIDE;
56 virtual gfx::Size GetMinimumSize() const OVERRIDE; 57 virtual gfx::Size GetMinimumSize() const OVERRIDE;
57 virtual gfx::Size GetMaximumSize() const OVERRIDE; 58 virtual gfx::Size GetMaximumSize() const OVERRIDE;
58 59
59 // Overridden from ButtonListener: 60 // Overridden from ButtonListener:
60 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; 61 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 140
140 // The icon of this window. May be NULL. 141 // The icon of this window. May be NULL.
141 ImageButton* window_icon_; 142 ImageButton* window_icon_;
142 143
143 // Window caption buttons. 144 // Window caption buttons.
144 ImageButton* minimize_button_; 145 ImageButton* minimize_button_;
145 ImageButton* maximize_button_; 146 ImageButton* maximize_button_;
146 ImageButton* restore_button_; 147 ImageButton* restore_button_;
147 ImageButton* close_button_; 148 ImageButton* close_button_;
148 149
149 // Should maximize button be shown?
150 bool should_show_maximize_button_;
151
152 // Background painter for the window frame. 150 // Background painter for the window frame.
153 scoped_ptr<FrameBackground> frame_background_; 151 scoped_ptr<FrameBackground> frame_background_;
154 152
155 // The horizontal boundaries for the title bar to layout within. Restricted 153 // The horizontal boundaries for the title bar to layout within. Restricted
156 // by the space used by the leading and trailing buttons. 154 // by the space used by the leading and trailing buttons.
157 int minimum_title_bar_x_; 155 int minimum_title_bar_x_;
158 int maximum_title_bar_x_; 156 int maximum_title_bar_x_;
159 157
160 DISALLOW_COPY_AND_ASSIGN(CustomFrameView); 158 DISALLOW_COPY_AND_ASSIGN(CustomFrameView);
161 }; 159 };
162 160
163 } // namespace views 161 } // namespace views
164 162
165 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ 163 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/widget/widget_unittest.cc ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698