| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "components/prefs/scoped_user_pref_update.h" | 11 #include "components/prefs/scoped_user_pref_update.h" |
| 12 #include "ui/base/ui_base_types.h" | 12 #include "ui/base/ui_base_types.h" |
| 13 | 13 |
| 14 class Browser; | 14 class Browser; |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class CommandLine; |
| 17 class DictionaryValue; | 18 class DictionaryValue; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace gfx { | 21 namespace gfx { |
| 21 class Rect; | 22 class Rect; |
| 22 } | 23 } |
| 23 | 24 |
| 24 class PrefService; | 25 class PrefService; |
| 25 | 26 |
| 26 namespace chrome { | 27 namespace chrome { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 51 | 52 |
| 52 void SaveWindowWorkspace(const Browser* browser, const std::string& workspace); | 53 void SaveWindowWorkspace(const Browser* browser, const std::string& workspace); |
| 53 | 54 |
| 54 // Return the |bounds| for the browser window to be used upon creation. | 55 // Return the |bounds| for the browser window to be used upon creation. |
| 55 // The |show_state| variable will receive the desired initial show state for | 56 // The |show_state| variable will receive the desired initial show state for |
| 56 // the window. | 57 // the window. |
| 57 void GetSavedWindowBoundsAndShowState(const Browser* browser, | 58 void GetSavedWindowBoundsAndShowState(const Browser* browser, |
| 58 gfx::Rect* bounds, | 59 gfx::Rect* bounds, |
| 59 ui::WindowShowState* show_state); | 60 ui::WindowShowState* show_state); |
| 60 | 61 |
| 62 namespace internal { |
| 63 |
| 64 // Updates window bounds and show state from the provided command-line. Part of |
| 65 // implementation of GetSavedWindowBoundsAndShowState, but exposed for testing. |
| 66 void UpdateWindowBoundsAndShowStateFromCommandLine( |
| 67 const base::CommandLine& command_line, |
| 68 gfx::Rect* bounds, |
| 69 ui::WindowShowState* show_state); |
| 70 |
| 71 } // namespace internal |
| 72 |
| 61 } // namespace chrome | 73 } // namespace chrome |
| 62 | 74 |
| 63 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_STATE_H_ | 75 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_STATE_H_ |
| OLD | NEW |