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

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

Issue 8733004: Make ExtensionService use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: = Created 9 years 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
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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 base::FundamentalValue tabId( 435 base::FundamentalValue tabId(
436 inspected_tab_->restore_tab_helper()->session_id().id()); 436 inspected_tab_->restore_tab_helper()->session_id().id());
437 CallClientFunction(ASCIIToUTF16("WebInspector.setInspectedTabId"), tabId); 437 CallClientFunction(ASCIIToUTF16("WebInspector.setInspectedTabId"), tabId);
438 } 438 }
439 ListValue results; 439 ListValue results;
440 const ExtensionService* extension_service = 440 const ExtensionService* extension_service =
441 tab_contents_->profile()->GetOriginalProfile()->GetExtensionService(); 441 tab_contents_->profile()->GetOriginalProfile()->GetExtensionService();
442 if (!extension_service) 442 if (!extension_service)
443 return; 443 return;
444 444
445 const ExtensionList* extensions = extension_service->extensions(); 445 const ExtensionSet* extensions = extension_service->extensions();
446 446
447 for (ExtensionList::const_iterator extension = extensions->begin(); 447 for (ExtensionSet::const_iterator extension = extensions->begin();
448 extension != extensions->end(); ++extension) { 448 extension != extensions->end(); ++extension) {
449 if ((*extension)->devtools_url().is_empty()) 449 if ((*extension)->devtools_url().is_empty())
450 continue; 450 continue;
451 DictionaryValue* extension_info = new DictionaryValue(); 451 DictionaryValue* extension_info = new DictionaryValue();
452 extension_info->Set("startPage", 452 extension_info->Set("startPage",
453 new StringValue((*extension)->devtools_url().spec())); 453 new StringValue((*extension)->devtools_url().spec()));
454 extension_info->Set("name", new StringValue((*extension)->name())); 454 extension_info->Set("name", new StringValue((*extension)->name()));
455 results.Append(extension_info); 455 results.Append(extension_info);
456 } 456 }
457 CallClientFunction(ASCIIToUTF16("WebInspector.addExtensions"), results); 457 CallClientFunction(ASCIIToUTF16("WebInspector.addExtensions"), results);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 RequestSetDocked(false); 699 RequestSetDocked(false);
700 } 700 }
701 701
702 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { 702 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() {
703 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { 703 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) {
704 return inspected_tab_->tab_contents()->delegate()-> 704 return inspected_tab_->tab_contents()->delegate()->
705 GetJavaScriptDialogCreator(); 705 GetJavaScriptDialogCreator();
706 } 706 }
707 return TabContentsDelegate::GetJavaScriptDialogCreator(); 707 return TabContentsDelegate::GetJavaScriptDialogCreator();
708 } 708 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698