Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 7980035: Pass name of a devtools extension when adding it to DevTools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698