| OLD | NEW |
| 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 Loading... |
| 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 GetBoundsOverrideAsh(gfx::Rect* bounds_in_screen, |
| 163 // SHOW_STATE_DEFAULT. | |
| 164 bool GetBoundsOverrideAsh(gfx::Rect* bounds_in_screen, | |
| 165 ui::WindowShowState* show_state) const; | 163 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 bool IsTabbedBrowserInAsh() const; |
| 171 bool IsPopupBrowserInAsh() const; |
| 172 |
| 172 // Providers for persistent storage and monitor metrics. | 173 // Providers for persistent storage and monitor metrics. |
| 173 scoped_ptr<StateProvider> state_provider_; | 174 scoped_ptr<StateProvider> state_provider_; |
| 174 gfx::Screen* screen_; // not owned. | 175 gfx::Screen* screen_; // not owned. |
| 175 | 176 |
| 176 // Note that this browser handle might be NULL. | 177 // Note that this browser handle might be NULL. |
| 177 const Browser* browser_; | 178 const Browser* browser_; |
| 178 | 179 |
| 179 DISALLOW_COPY_AND_ASSIGN(WindowSizer); | 180 DISALLOW_COPY_AND_ASSIGN(WindowSizer); |
| 180 }; | 181 }; |
| 181 | 182 |
| 182 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ | 183 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ |
| OLD | NEW |