| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/debugger/devtools_manager.h" | 5 #include "chrome/browser/debugger/devtools_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 DevToolsManager* DevToolsManager::GetInstance() { | 29 DevToolsManager* DevToolsManager::GetInstance() { |
| 30 // http://crbug.com/47806 this method may be called when BrowserProcess | 30 // http://crbug.com/47806 this method may be called when BrowserProcess |
| 31 // has already been destroyed. | 31 // has already been destroyed. |
| 32 if (!g_browser_process) | 32 if (!g_browser_process) |
| 33 return NULL; | 33 return NULL; |
| 34 return g_browser_process->devtools_manager(); | 34 return g_browser_process->devtools_manager(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 // static | 37 // static |
| 38 void DevToolsManager::RegisterUserPrefs(PrefService* prefs) { | 38 void DevToolsManager::RegisterUserPrefs(PrefService* prefs) { |
| 39 prefs->RegisterBooleanPref(prefs::kDevToolsOpenDocked, true); | 39 prefs->RegisterBooleanPref(prefs::kDevToolsOpenDocked, |
| 40 true, |
| 41 PrefService::UNSYNCABLE_PREF); |
| 40 } | 42 } |
| 41 | 43 |
| 42 DevToolsManager::DevToolsManager() | 44 DevToolsManager::DevToolsManager() |
| 43 : inspected_rvh_for_reopen_(NULL), | 45 : inspected_rvh_for_reopen_(NULL), |
| 44 in_initial_show_(false), | 46 in_initial_show_(false), |
| 45 last_orphan_cookie_(0) { | 47 last_orphan_cookie_(0) { |
| 46 registrar_.Add(this, NotificationType::RENDER_VIEW_HOST_DELETED, | 48 registrar_.Add(this, NotificationType::RENDER_VIEW_HOST_DELETED, |
| 47 NotificationService::AllSources()); | 49 NotificationService::AllSources()); |
| 48 } | 50 } |
| 49 | 51 |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 for (InspectedRvhToClientHostMap::iterator it = | 457 for (InspectedRvhToClientHostMap::iterator it = |
| 456 inspected_rvh_to_client_host_.begin(); | 458 inspected_rvh_to_client_host_.begin(); |
| 457 it != inspected_rvh_to_client_host_.end(); ++it) { | 459 it != inspected_rvh_to_client_host_.end(); ++it) { |
| 458 rhvs.push_back(it->first); | 460 rhvs.push_back(it->first); |
| 459 } | 461 } |
| 460 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); | 462 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); |
| 461 it != rhvs.end(); ++it) { | 463 it != rhvs.end(); ++it) { |
| 462 UnregisterDevToolsClientHostFor(*it); | 464 UnregisterDevToolsClientHostFor(*it); |
| 463 } | 465 } |
| 464 } | 466 } |
| OLD | NEW |