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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer.h

Issue 424463002: Makes a window that has been resized to maximized bounds, then maximized and then restored shrink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Maximizes a window that has been resized to maximized bounds (nits, restricts to tabbed browsers) Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/window_state_unittest.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_ash.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 CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ 5 #ifndef CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_
6 #define CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ 6 #define CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/host_desktop.h" 10 #include "chrome/browser/ui/host_desktop.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 // Determine the target display for a new window based on 157 // Determine the target display for a new window based on
158 // |bounds|. On ash environment, this returns the display containing 158 // |bounds|. On ash environment, this returns the display containing
159 // ash's the target root window. 159 // ash's the target root window.
160 gfx::Display GetTargetDisplay(const gfx::Rect& bounds) const; 160 gfx::Display GetTargetDisplay(const gfx::Rect& bounds) const;
161 161
162 #if defined(USE_ASH) 162 #if defined(USE_ASH)
163 // Ash specific logic for window placement. Returns true if |bounds| and 163 // Ash specific logic for window placement. Returns true if |bounds| and
164 // |show_state| have been fully determined, otherwise returns false (but 164 // |show_state| have been fully determined, otherwise returns false (but
165 // may still affect |show_state|). 165 // may still affect |show_state|).
166 // If the window is too big to fit in the display work area then the |bounds|
167 // are adjusted to default bounds and the |show_state| is adjusted to
168 // SHOW_STATE_MAXIMIZED.
166 bool GetBrowserBoundsAsh(gfx::Rect* bounds, 169 bool GetBrowserBoundsAsh(gfx::Rect* bounds,
167 ui::WindowShowState* show_state) const; 170 ui::WindowShowState* show_state) const;
168 171
169 // Determines the position and size for a tabbed browser window in 172 // Determines the position and size for a tabbed browser window in
170 // ash as it gets created. This will be called before other standard 173 // ash as it gets created. This will be called before other standard
171 // placement logic. |show_state| will only be changed 174 // placement logic. |show_state| will only be changed
172 // if it was set to SHOW_STATE_DEFAULT. 175 // if it was set to SHOW_STATE_DEFAULT.
173 void GetTabbedBrowserBoundsAsh(gfx::Rect* bounds, 176 void GetTabbedBrowserBoundsAsh(gfx::Rect* bounds,
174 ui::WindowShowState* show_state) const; 177 ui::WindowShowState* show_state) const;
175 #endif 178 #endif
176 179
177 // Determine the default show state for the window - not looking at other 180 // Determine the default show state for the window - not looking at other
178 // windows or at persistent information. 181 // windows or at persistent information.
179 ui::WindowShowState GetWindowDefaultShowState() const; 182 ui::WindowShowState GetWindowDefaultShowState() const;
180 183
181 // Providers for persistent storage and monitor metrics. 184 // Providers for persistent storage and monitor metrics.
182 scoped_ptr<StateProvider> state_provider_; 185 scoped_ptr<StateProvider> state_provider_;
183 scoped_ptr<TargetDisplayProvider> target_display_provider_; 186 scoped_ptr<TargetDisplayProvider> target_display_provider_;
184 gfx::Screen* screen_; // not owned. 187 gfx::Screen* screen_; // not owned.
185 188
186 // Note that this browser handle might be NULL. 189 // Note that this browser handle might be NULL.
187 const Browser* browser_; 190 const Browser* browser_;
188 191
189 DISALLOW_COPY_AND_ASSIGN(WindowSizer); 192 DISALLOW_COPY_AND_ASSIGN(WindowSizer);
190 }; 193 };
191 194
192 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ 195 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/window_state_unittest.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698