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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 440 |
441 for (ExtensionSet::const_iterator extension = extensions->begin(); | 441 for (ExtensionSet::const_iterator extension = extensions->begin(); |
442 extension != extensions->end(); ++extension) { | 442 extension != extensions->end(); ++extension) { |
443 if ((*extension)->devtools_url().is_empty()) | 443 if ((*extension)->devtools_url().is_empty()) |
444 continue; | 444 continue; |
445 DictionaryValue* extension_info = new DictionaryValue(); | 445 DictionaryValue* extension_info = new DictionaryValue(); |
446 extension_info->Set("startPage", | 446 extension_info->Set("startPage", |
447 new StringValue((*extension)->devtools_url().spec())); | 447 new StringValue((*extension)->devtools_url().spec())); |
448 extension_info->Set("name", new StringValue((*extension)->name())); | 448 extension_info->Set("name", new StringValue((*extension)->name())); |
449 bool allow_experimental = (*extension)->HasAPIPermission( | 449 bool allow_experimental = (*extension)->HasAPIPermission( |
450 ExtensionAPIPermission::kExperimental); | 450 extensions::APIPermission::kExperimental); |
451 extension_info->Set("exposeExperimentalAPIs", | 451 extension_info->Set("exposeExperimentalAPIs", |
452 new base::FundamentalValue(allow_experimental)); | 452 new base::FundamentalValue(allow_experimental)); |
453 results.Append(extension_info); | 453 results.Append(extension_info); |
454 } | 454 } |
455 CallClientFunction("WebInspector.addExtensions", &results); | 455 CallClientFunction("WebInspector.addExtensions", &results); |
456 } | 456 } |
457 | 457 |
458 WebContents* DevToolsWindow::OpenURLFromTab(WebContents* source, | 458 WebContents* DevToolsWindow::OpenURLFromTab(WebContents* source, |
459 const OpenURLParams& params) { | 459 const OpenURLParams& params) { |
460 if (inspected_tab_) | 460 if (inspected_tab_) |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value); | 745 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value); |
746 } | 746 } |
747 | 747 |
748 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 748 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
749 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) { | 749 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) { |
750 return inspected_tab_->web_contents()->GetDelegate()-> | 750 return inspected_tab_->web_contents()->GetDelegate()-> |
751 GetJavaScriptDialogCreator(); | 751 GetJavaScriptDialogCreator(); |
752 } | 752 } |
753 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); | 753 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); |
754 } | 754 } |
OLD | NEW |