| 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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 588 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| 589 const ExtensionService* extension_service = extensions::ExtensionSystem::Get( | 589 const ExtensionService* extension_service = extensions::ExtensionSystem::Get( |
| 590 profile->GetOriginalProfile())->extension_service(); | 590 profile->GetOriginalProfile())->extension_service(); |
| 591 if (!extension_service) | 591 if (!extension_service) |
| 592 return; | 592 return; |
| 593 | 593 |
| 594 const ExtensionSet* extensions = extension_service->extensions(); | 594 const ExtensionSet* extensions = extension_service->extensions(); |
| 595 | 595 |
| 596 for (ExtensionSet::const_iterator extension = extensions->begin(); | 596 for (ExtensionSet::const_iterator extension = extensions->begin(); |
| 597 extension != extensions->end(); ++extension) { | 597 extension != extensions->end(); ++extension) { |
| 598 if (extensions::ManifestURL::GetDevToolsPage(*extension).is_empty()) | 598 if (extensions::ManifestURL::GetDevToolsPage(extension->get()).is_empty()) |
| 599 continue; | 599 continue; |
| 600 DictionaryValue* extension_info = new DictionaryValue(); | 600 DictionaryValue* extension_info = new DictionaryValue(); |
| 601 extension_info->Set("startPage", new StringValue( | 601 extension_info->Set( |
| 602 extensions::ManifestURL::GetDevToolsPage(*extension).spec())); | 602 "startPage", |
| 603 new StringValue( |
| 604 extensions::ManifestURL::GetDevToolsPage(extension->get()).spec())); |
| 603 extension_info->Set("name", new StringValue((*extension)->name())); | 605 extension_info->Set("name", new StringValue((*extension)->name())); |
| 604 bool allow_experimental = (*extension)->HasAPIPermission( | 606 bool allow_experimental = (*extension)->HasAPIPermission( |
| 605 extensions::APIPermission::kExperimental); | 607 extensions::APIPermission::kExperimental); |
| 606 extension_info->Set("exposeExperimentalAPIs", | 608 extension_info->Set("exposeExperimentalAPIs", |
| 607 new base::FundamentalValue(allow_experimental)); | 609 new base::FundamentalValue(allow_experimental)); |
| 608 results.Append(extension_info); | 610 results.Append(extension_info); |
| 609 } | 611 } |
| 610 CallClientFunction("WebInspector.addExtensions", &results); | 612 CallClientFunction("WebInspector.addExtensions", &results); |
| 611 } | 613 } |
| 612 | 614 |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 DevToolsDockSide DevToolsWindow::SideFromString( | 1168 DevToolsDockSide DevToolsWindow::SideFromString( |
| 1167 const std::string& dock_side) { | 1169 const std::string& dock_side) { |
| 1168 if (dock_side == kDockSideRight) | 1170 if (dock_side == kDockSideRight) |
| 1169 return DEVTOOLS_DOCK_SIDE_RIGHT; | 1171 return DEVTOOLS_DOCK_SIDE_RIGHT; |
| 1170 if (dock_side == kDockSideBottom) | 1172 if (dock_side == kDockSideBottom) |
| 1171 return DEVTOOLS_DOCK_SIDE_BOTTOM; | 1173 return DEVTOOLS_DOCK_SIDE_BOTTOM; |
| 1172 if (dock_side == kDockSideMinimized) | 1174 if (dock_side == kDockSideMinimized) |
| 1173 return DEVTOOLS_DOCK_SIDE_MINIMIZED; | 1175 return DEVTOOLS_DOCK_SIDE_MINIMIZED; |
| 1174 return DEVTOOLS_DOCK_SIDE_UNDOCKED; | 1176 return DEVTOOLS_DOCK_SIDE_UNDOCKED; |
| 1175 } | 1177 } |
| OLD | NEW |