| 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/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 prefs::kDevToolsPortForwardingEnabled, | 322 prefs::kDevToolsPortForwardingEnabled, |
| 323 false, | 323 false, |
| 324 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 324 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 325 registry->RegisterBooleanPref( | 325 registry->RegisterBooleanPref( |
| 326 prefs::kDevToolsPortForwardingDefaultSet, | 326 prefs::kDevToolsPortForwardingDefaultSet, |
| 327 false, | 327 false, |
| 328 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 328 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 329 registry->RegisterDictionaryPref( | 329 registry->RegisterDictionaryPref( |
| 330 prefs::kDevToolsPortForwardingConfig, | 330 prefs::kDevToolsPortForwardingConfig, |
| 331 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 331 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 332 registry->RegisterDictionaryPref( |
| 333 prefs::kDevToolsPreferences, |
| 334 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 332 } | 335 } |
| 333 | 336 |
| 334 // static | 337 // static |
| 335 content::WebContents* DevToolsWindow::GetInTabWebContents( | 338 content::WebContents* DevToolsWindow::GetInTabWebContents( |
| 336 WebContents* inspected_web_contents, | 339 WebContents* inspected_web_contents, |
| 337 DevToolsContentsResizingStrategy* out_strategy) { | 340 DevToolsContentsResizingStrategy* out_strategy) { |
| 338 DevToolsWindow* window = GetInstanceForInspectedWebContents( | 341 DevToolsWindow* window = GetInstanceForInspectedWebContents( |
| 339 inspected_web_contents); | 342 inspected_web_contents); |
| 340 if (!window || window->life_stage_ == kClosing) | 343 if (!window || window->life_stage_ == kClosing) |
| 341 return NULL; | 344 return NULL; |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 closure.Run(); | 1219 closure.Run(); |
| 1217 return; | 1220 return; |
| 1218 } | 1221 } |
| 1219 load_completed_callback_ = closure; | 1222 load_completed_callback_ = closure; |
| 1220 } | 1223 } |
| 1221 | 1224 |
| 1222 bool DevToolsWindow::ForwardKeyboardEvent( | 1225 bool DevToolsWindow::ForwardKeyboardEvent( |
| 1223 const content::NativeWebKeyboardEvent& event) { | 1226 const content::NativeWebKeyboardEvent& event) { |
| 1224 return event_forwarder_->ForwardEvent(event); | 1227 return event_forwarder_->ForwardEvent(event); |
| 1225 } | 1228 } |
| OLD | NEW |