| 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_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 CallClientFunction("WebInspector.setInspectedTabId", &tabId, NULL, NULL); | 1465 CallClientFunction("WebInspector.setInspectedTabId", &tabId, NULL, NULL); |
| 1466 } | 1466 } |
| 1467 } | 1467 } |
| 1468 | 1468 |
| 1469 Profile* profile = | 1469 Profile* profile = |
| 1470 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 1470 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| 1471 const ExtensionService* extension_service = extensions::ExtensionSystem::Get( | 1471 const ExtensionService* extension_service = extensions::ExtensionSystem::Get( |
| 1472 profile->GetOriginalProfile())->extension_service(); | 1472 profile->GetOriginalProfile())->extension_service(); |
| 1473 if (!extension_service) | 1473 if (!extension_service) |
| 1474 return; | 1474 return; |
| 1475 const ExtensionSet* extensions = extension_service->extensions(); | 1475 const extensions::ExtensionSet* extensions = extension_service->extensions(); |
| 1476 | 1476 |
| 1477 ListValue results; | 1477 ListValue results; |
| 1478 for (ExtensionSet::const_iterator extension(extensions->begin()); | 1478 for (extensions::ExtensionSet::const_iterator extension(extensions->begin()); |
| 1479 extension != extensions->end(); ++extension) { | 1479 extension != extensions->end(); ++extension) { |
| 1480 if (extensions::ManifestURL::GetDevToolsPage(extension->get()).is_empty()) | 1480 if (extensions::ManifestURL::GetDevToolsPage(extension->get()).is_empty()) |
| 1481 continue; | 1481 continue; |
| 1482 DictionaryValue* extension_info = new DictionaryValue(); | 1482 DictionaryValue* extension_info = new DictionaryValue(); |
| 1483 extension_info->Set( | 1483 extension_info->Set( |
| 1484 "startPage", | 1484 "startPage", |
| 1485 new StringValue( | 1485 new StringValue( |
| 1486 extensions::ManifestURL::GetDevToolsPage(extension->get()).spec())); | 1486 extensions::ManifestURL::GetDevToolsPage(extension->get()).spec())); |
| 1487 extension_info->Set("name", new StringValue((*extension)->name())); | 1487 extension_info->Set("name", new StringValue((*extension)->name())); |
| 1488 extension_info->Set( | 1488 extension_info->Set( |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 return inspected_contents_observer_ ? | 1536 return inspected_contents_observer_ ? |
| 1537 inspected_contents_observer_->web_contents() : NULL; | 1537 inspected_contents_observer_->web_contents() : NULL; |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { | 1540 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { |
| 1541 is_loaded_ = true; | 1541 is_loaded_ = true; |
| 1542 UpdateTheme(); | 1542 UpdateTheme(); |
| 1543 DoAction(); | 1543 DoAction(); |
| 1544 AddDevToolsExtensionsToClient(); | 1544 AddDevToolsExtensionsToClient(); |
| 1545 } | 1545 } |
| OLD | NEW |