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

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

Issue 23567007: More cleanup in window_sizer/window_sizer_ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/window_sizer/window_sizer.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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // If |saved_work_area| is non-empty, it is used to determine whether the 148 // If |saved_work_area| is non-empty, it is used to determine whether the
149 // monitor configuration has changed. If it has, bounds are repositioned and 149 // monitor configuration has changed. If it has, bounds are repositioned and
150 // resized if necessary to make them completely contained in the current work 150 // resized if necessary to make them completely contained in the current work
151 // area. 151 // area.
152 void AdjustBoundsToBeVisibleOnMonitorContaining( 152 void AdjustBoundsToBeVisibleOnMonitorContaining(
153 const gfx::Rect& other_bounds, 153 const gfx::Rect& other_bounds,
154 const gfx::Rect& saved_work_area, 154 const gfx::Rect& saved_work_area,
155 gfx::Rect* bounds) const; 155 gfx::Rect* bounds) const;
156 156
157 #if defined(USE_ASH) 157 #if defined(USE_ASH)
158 // Determines the position and size for an ash window as it gets created. This 158 // Determines the position and size for a tabbed browser window in
159 // will be called before other standard placement logic. It will return true 159 // ash as it gets created. This will be called before other standard
160 // when the function was setting the bounds structure to the desired size. 160 // placement logic. |show_state| will only be changed
161 // Otherwise another algorithm should get used to determine the correct 161 // if it was set to SHOW_STATE_DEFAULT.
162 // bounds. |show_state| will only be changed if it was set to 162 void GetTabbedBrowserBoundsAsh(gfx::Rect* bounds_in_screen,
163 // SHOW_STATE_DEFAULT. 163 ui::WindowShowState* show_state) const;
164 bool GetBoundsOverrideAsh(gfx::Rect* bounds_in_screen,
165 ui::WindowShowState* show_state) const;
166 #endif 164 #endif
167 165
168 // Determine the default show state for the window - not looking at other 166 // Determine the default show state for the window - not looking at other
169 // windows or at persistent information. 167 // windows or at persistent information.
170 ui::WindowShowState GetWindowDefaultShowState() const; 168 ui::WindowShowState GetWindowDefaultShowState() const;
171 169
170 #if defined(USE_ASH)
171 bool IsTabbedBrowserInAsh() const;
172 bool IsPopupBrowserInAsh() const;
173 #endif
174
172 // Providers for persistent storage and monitor metrics. 175 // Providers for persistent storage and monitor metrics.
173 scoped_ptr<StateProvider> state_provider_; 176 scoped_ptr<StateProvider> state_provider_;
174 gfx::Screen* screen_; // not owned. 177 gfx::Screen* screen_; // not owned.
175 178
176 // Note that this browser handle might be NULL. 179 // Note that this browser handle might be NULL.
177 const Browser* browser_; 180 const Browser* browser_;
178 181
179 DISALLOW_COPY_AND_ASSIGN(WindowSizer); 182 DISALLOW_COPY_AND_ASSIGN(WindowSizer);
180 }; 183 };
181 184
182 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ 185 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/window_sizer/window_sizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698