| 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/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 const ExtensionList* extensions = extension_service->extensions(); | 397 const ExtensionList* extensions = extension_service->extensions(); |
| 398 | 398 |
| 399 for (ExtensionList::const_iterator extension = extensions->begin(); | 399 for (ExtensionList::const_iterator extension = extensions->begin(); |
| 400 extension != extensions->end(); ++extension) { | 400 extension != extensions->end(); ++extension) { |
| 401 if ((*extension)->devtools_url().is_empty()) | 401 if ((*extension)->devtools_url().is_empty()) |
| 402 continue; | 402 continue; |
| 403 DictionaryValue* extension_info = new DictionaryValue(); | 403 DictionaryValue* extension_info = new DictionaryValue(); |
| 404 extension_info->Set("startPage", | 404 extension_info->Set("startPage", |
| 405 new StringValue((*extension)->devtools_url().spec())); | 405 new StringValue((*extension)->devtools_url().spec())); |
| 406 extension_info->Set("name", new StringValue((*extension)->name())); |
| 406 results.Append(extension_info); | 407 results.Append(extension_info); |
| 407 } | 408 } |
| 408 CallClientFunction(ASCIIToUTF16("WebInspector.addExtensions"), results); | 409 CallClientFunction(ASCIIToUTF16("WebInspector.addExtensions"), results); |
| 409 } | 410 } |
| 410 | 411 |
| 411 // TODO(adriansc): Remove this method once refactoring changed all call sites. | 412 // TODO(adriansc): Remove this method once refactoring changed all call sites. |
| 412 TabContents* DevToolsWindow::OpenURLFromTab(TabContents* source, | 413 TabContents* DevToolsWindow::OpenURLFromTab(TabContents* source, |
| 413 const GURL& url, | 414 const GURL& url, |
| 414 const GURL& referrer, | 415 const GURL& referrer, |
| 415 WindowOpenDisposition disposition, | 416 WindowOpenDisposition disposition, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 RequestSetDocked(false); | 643 RequestSetDocked(false); |
| 643 } | 644 } |
| 644 | 645 |
| 645 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 646 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
| 646 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { | 647 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { |
| 647 return inspected_tab_->tab_contents()->delegate()-> | 648 return inspected_tab_->tab_contents()->delegate()-> |
| 648 GetJavaScriptDialogCreator(); | 649 GetJavaScriptDialogCreator(); |
| 649 } | 650 } |
| 650 return TabContentsDelegate::GetJavaScriptDialogCreator(); | 651 return TabContentsDelegate::GetJavaScriptDialogCreator(); |
| 651 } | 652 } |
| OLD | NEW |