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/devtools/devtools_window.h" | 5 #include "chrome/browser/devtools/devtools_window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // static | 174 // static |
175 std::string DevToolsWindow::GetDevToolsWindowPlacementPrefKey() { | 175 std::string DevToolsWindow::GetDevToolsWindowPlacementPrefKey() { |
176 std::string wp_key; | 176 std::string wp_key; |
177 wp_key.append(prefs::kBrowserWindowPlacement); | 177 wp_key.append(prefs::kBrowserWindowPlacement); |
178 wp_key.append("_"); | 178 wp_key.append("_"); |
179 wp_key.append(kDevToolsApp); | 179 wp_key.append(kDevToolsApp); |
180 return wp_key; | 180 return wp_key; |
181 } | 181 } |
182 | 182 |
183 // static | 183 // static |
184 void DevToolsWindow::RegisterUserPrefs( | 184 void DevToolsWindow::RegisterProfilePrefs( |
185 user_prefs::PrefRegistrySyncable* registry) { | 185 user_prefs::PrefRegistrySyncable* registry) { |
186 registry->RegisterBooleanPref( | 186 registry->RegisterBooleanPref( |
187 prefs::kDevToolsOpenDocked, | 187 prefs::kDevToolsOpenDocked, |
188 true, | 188 true, |
189 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 189 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
190 registry->RegisterStringPref( | 190 registry->RegisterStringPref( |
191 prefs::kDevToolsDockSide, | 191 prefs::kDevToolsDockSide, |
192 kDockSideBottom, | 192 kDockSideBottom, |
193 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 193 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
194 registry->RegisterDictionaryPref( | 194 registry->RegisterDictionaryPref( |
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 DevToolsDockSide DevToolsWindow::SideFromString( | 1168 DevToolsDockSide DevToolsWindow::SideFromString( |
1169 const std::string& dock_side) { | 1169 const std::string& dock_side) { |
1170 if (dock_side == kDockSideRight) | 1170 if (dock_side == kDockSideRight) |
1171 return DEVTOOLS_DOCK_SIDE_RIGHT; | 1171 return DEVTOOLS_DOCK_SIDE_RIGHT; |
1172 if (dock_side == kDockSideBottom) | 1172 if (dock_side == kDockSideBottom) |
1173 return DEVTOOLS_DOCK_SIDE_BOTTOM; | 1173 return DEVTOOLS_DOCK_SIDE_BOTTOM; |
1174 if (dock_side == kDockSideMinimized) | 1174 if (dock_side == kDockSideMinimized) |
1175 return DEVTOOLS_DOCK_SIDE_MINIMIZED; | 1175 return DEVTOOLS_DOCK_SIDE_MINIMIZED; |
1176 return DEVTOOLS_DOCK_SIDE_UNDOCKED; | 1176 return DEVTOOLS_DOCK_SIDE_UNDOCKED; |
1177 } | 1177 } |
OLD | NEW |