| 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 #include "chrome/browser/ui/browser_window_state.h" | 5 #include "chrome/browser/ui/browser_window_state.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "chrome/browser/defaults.h" | 9 #include "chrome/browser/defaults.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/sessions/session_service.h" | 12 #include "chrome/browser/sessions/session_service.h" |
| 13 #include "chrome/browser/sessions/session_service_factory.h" | 13 #include "chrome/browser/sessions/session_service_factory.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/window_sizer.h" | 15 #include "chrome/browser/ui/window_sizer/window_sizer.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 | 18 |
| 19 namespace chrome { | 19 namespace chrome { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Parse two comma-separated integers from str. Return true on success. | 22 // Parse two comma-separated integers from str. Return true on success. |
| 23 bool ParseCommaSeparatedIntegers(const std::string& str, | 23 bool ParseCommaSeparatedIntegers(const std::string& str, |
| 24 int* ret_num1, | 24 int* ret_num1, |
| 25 int* ret_num2) { | 25 int* ret_num2) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 const DictionaryValue* window_pref = browser->profile()->GetPrefs()-> | 140 const DictionaryValue* window_pref = browser->profile()->GetPrefs()-> |
| 141 GetDictionary(GetWindowPlacementKey(browser).c_str()); | 141 GetDictionary(GetWindowPlacementKey(browser).c_str()); |
| 142 bool maximized = false; | 142 bool maximized = false; |
| 143 window_pref->GetBoolean("maximized", &maximized); | 143 window_pref->GetBoolean("maximized", &maximized); |
| 144 | 144 |
| 145 return maximized ? ui::SHOW_STATE_MAXIMIZED : ui::SHOW_STATE_DEFAULT; | 145 return maximized ? ui::SHOW_STATE_MAXIMIZED : ui::SHOW_STATE_DEFAULT; |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace chrome | 148 } // namespace chrome |
| OLD | NEW |