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 "chrome/browser/extensions/extensions_ui.h" | 5 #include "chrome/browser/extensions/extensions_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 636 |
637 // Static | 637 // Static |
638 DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue( | 638 DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue( |
639 ExtensionService* service, const Extension* extension, | 639 ExtensionService* service, const Extension* extension, |
640 const std::vector<ExtensionPage>& pages, bool enabled, bool terminated) { | 640 const std::vector<ExtensionPage>& pages, bool enabled, bool terminated) { |
641 DictionaryValue* extension_data = new DictionaryValue(); | 641 DictionaryValue* extension_data = new DictionaryValue(); |
642 GURL icon = | 642 GURL icon = |
643 ExtensionIconSource::GetIconURL(extension, | 643 ExtensionIconSource::GetIconURL(extension, |
644 Extension::EXTENSION_ICON_MEDIUM, | 644 Extension::EXTENSION_ICON_MEDIUM, |
645 ExtensionIconSet::MATCH_BIGGER, | 645 ExtensionIconSet::MATCH_BIGGER, |
646 !enabled); | 646 !enabled, NULL); |
647 extension_data->SetString("id", extension->id()); | 647 extension_data->SetString("id", extension->id()); |
648 extension_data->SetString("name", extension->name()); | 648 extension_data->SetString("name", extension->name()); |
649 extension_data->SetString("description", extension->description()); | 649 extension_data->SetString("description", extension->description()); |
650 if (extension->location() == Extension::LOAD) | 650 if (extension->location() == Extension::LOAD) |
651 extension_data->SetString("path", extension->path().value()); | 651 extension_data->SetString("path", extension->path().value()); |
652 extension_data->SetString("version", extension->version()->GetString()); | 652 extension_data->SetString("version", extension->version()->GetString()); |
653 extension_data->SetString("icon", icon.spec()); | 653 extension_data->SetString("icon", icon.spec()); |
654 extension_data->SetBoolean("isUnpacked", | 654 extension_data->SetBoolean("isUnpacked", |
655 extension->location() == Extension::LOAD); | 655 extension->location() == Extension::LOAD); |
656 extension_data->SetBoolean("mayDisable", | 656 extension_data->SetBoolean("mayDisable", |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 return ResourceBundle::GetSharedInstance(). | 794 return ResourceBundle::GetSharedInstance(). |
795 LoadDataResourceBytes(IDR_PLUGIN); | 795 LoadDataResourceBytes(IDR_PLUGIN); |
796 } | 796 } |
797 | 797 |
798 // static | 798 // static |
799 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 799 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
800 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, | 800 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, |
801 false, | 801 false, |
802 PrefService::SYNCABLE_PREF); | 802 PrefService::SYNCABLE_PREF); |
803 } | 803 } |
OLD | NEW |