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

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

Issue 8789018: Revert 113047 - 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
Property Changes:
Added: svn:mergeinfo
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ExtensionSet* extensions = extension_service->extensions(); 417 const ExtensionList* extensions = extension_service->extensions();
418 418
419 for (ExtensionSet::const_iterator extension = extensions->begin(); 419 for (ExtensionList::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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_contents_service.cc ('k') | chrome/browser/extensions/browser_action_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698