| 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_BROWSER_WINDOW_STATE_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_WINDOW_STATE_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_STATE_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_STATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/prefs/scoped_user_pref_update.h" |
| 10 #include "ui/base/ui_base_types.h" | 12 #include "ui/base/ui_base_types.h" |
| 11 | 13 |
| 12 class Browser; | 14 class Browser; |
| 13 | 15 |
| 16 namespace base { |
| 17 class DictionaryValue; |
| 18 } |
| 19 |
| 14 namespace gfx { | 20 namespace gfx { |
| 15 class Rect; | 21 class Rect; |
| 16 } | 22 } |
| 17 | 23 |
| 24 class PrefService; |
| 25 |
| 18 namespace chrome { | 26 namespace chrome { |
| 19 | 27 |
| 20 std::string GetWindowPlacementKey(const Browser* browser); | 28 std::string GetWindowName(const Browser* browser); |
| 29 scoped_ptr<DictionaryPrefUpdate> GetWindowPlacementDictionaryReadWrite( |
| 30 const std::string& window_name, |
| 31 PrefService* prefs); |
| 32 const base::DictionaryValue* GetWindowPlacementDictionaryReadOnly( |
| 33 const Browser* browser); |
| 21 | 34 |
| 22 bool ShouldSaveWindowPlacement(const Browser* browser); | 35 bool ShouldSaveWindowPlacement(const Browser* browser); |
| 23 | 36 |
| 24 void SaveWindowPlacement(const Browser* browser, | 37 void SaveWindowPlacement(const Browser* browser, |
| 25 const gfx::Rect& bounds, | 38 const gfx::Rect& bounds, |
| 26 ui::WindowShowState show_state); | 39 ui::WindowShowState show_state); |
| 27 | 40 |
| 28 // Return the |bounds| for the browser window to be used upon creation. | 41 // Return the |bounds| for the browser window to be used upon creation. |
| 29 // The |show_state| variable will receive the desired initial show state for | 42 // The |show_state| variable will receive the desired initial show state for |
| 30 // the window. | 43 // the window. |
| 31 void GetSavedWindowBoundsAndShowState(const Browser* browser, | 44 void GetSavedWindowBoundsAndShowState(const Browser* browser, |
| 32 gfx::Rect* bounds, | 45 gfx::Rect* bounds, |
| 33 ui::WindowShowState* show_state); | 46 ui::WindowShowState* show_state); |
| 34 | 47 |
| 35 } // namespace chrome | 48 } // namespace chrome |
| 36 | 49 |
| 37 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_STATE_H_ | 50 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_STATE_H_ |
| OLD | NEW |