| 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 <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/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 base::FundamentalValue tabId( | 407 base::FundamentalValue tabId( |
| 408 inspected_tab_->restore_tab_helper()->session_id().id()); | 408 inspected_tab_->restore_tab_helper()->session_id().id()); |
| 409 CallClientFunction(ASCIIToUTF16("WebInspector.setInspectedTabId"), tabId); | 409 CallClientFunction(ASCIIToUTF16("WebInspector.setInspectedTabId"), tabId); |
| 410 } | 410 } |
| 411 ListValue results; | 411 ListValue results; |
| 412 const ExtensionService* extension_service = | 412 const ExtensionService* extension_service = |
| 413 tab_contents_->profile()->GetOriginalProfile()->GetExtensionService(); | 413 tab_contents_->profile()->GetOriginalProfile()->GetExtensionService(); |
| 414 if (!extension_service) | 414 if (!extension_service) |
| 415 return; | 415 return; |
| 416 | 416 |
| 417 const ExtensionList* extensions = extension_service->extensions(); | 417 const ExtensionSet* extensions = extension_service->extensions(); |
| 418 | 418 |
| 419 for (ExtensionList::const_iterator extension = extensions->begin(); | 419 for (ExtensionSet::const_iterator extension = extensions->begin(); |
| 420 extension != extensions->end(); ++extension) { | 420 extension != extensions->end(); ++extension) { |
| 421 if ((*extension)->devtools_url().is_empty()) | 421 if ((*extension)->devtools_url().is_empty()) |
| 422 continue; | 422 continue; |
| 423 DictionaryValue* extension_info = new DictionaryValue(); | 423 DictionaryValue* extension_info = new DictionaryValue(); |
| 424 extension_info->Set("startPage", | 424 extension_info->Set("startPage", |
| 425 new StringValue((*extension)->devtools_url().spec())); | 425 new StringValue((*extension)->devtools_url().spec())); |
| 426 extension_info->Set("name", new StringValue((*extension)->name())); | 426 extension_info->Set("name", new StringValue((*extension)->name())); |
| 427 results.Append(extension_info); | 427 results.Append(extension_info); |
| 428 } | 428 } |
| 429 CallClientFunction(ASCIIToUTF16("WebInspector.addExtensions"), results); | 429 CallClientFunction(ASCIIToUTF16("WebInspector.addExtensions"), results); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 content); | 671 content); |
| 672 } | 672 } |
| 673 | 673 |
| 674 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 674 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
| 675 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { | 675 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { |
| 676 return inspected_tab_->tab_contents()->delegate()-> | 676 return inspected_tab_->tab_contents()->delegate()-> |
| 677 GetJavaScriptDialogCreator(); | 677 GetJavaScriptDialogCreator(); |
| 678 } | 678 } |
| 679 return TabContentsDelegate::GetJavaScriptDialogCreator(); | 679 return TabContentsDelegate::GetJavaScriptDialogCreator(); |
| 680 } | 680 } |
| OLD | NEW |