| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "app/gfx/codec/png_codec.h" | 7 #include "app/gfx/codec/png_codec.h" |
| 8 #include "app/gfx/color_utils.h" | 8 #include "app/gfx/color_utils.h" |
| 9 #include "app/gfx/skbitmap_operations.h" | 9 #include "app/gfx/skbitmap_operations.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_ROOT_DIRECTORY_LABEL)); | 111 l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_ROOT_DIRECTORY_LABEL)); |
| 112 localized_strings.SetString(L"packDialogBrowse", | 112 localized_strings.SetString(L"packDialogBrowse", |
| 113 l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_BROWSE)); | 113 l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_BROWSE)); |
| 114 localized_strings.SetString(L"privateKeyLabel", | 114 localized_strings.SetString(L"privateKeyLabel", |
| 115 l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_PRIVATE_KEY_LABEL)); | 115 l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_PRIVATE_KEY_LABEL)); |
| 116 localized_strings.SetString(L"okButton", | 116 localized_strings.SetString(L"okButton", |
| 117 l10n_util::GetString(IDS_OK)); | 117 l10n_util::GetString(IDS_OK)); |
| 118 localized_strings.SetString(L"cancelButton", | 118 localized_strings.SetString(L"cancelButton", |
| 119 l10n_util::GetString(IDS_CANCEL)); | 119 l10n_util::GetString(IDS_CANCEL)); |
| 120 | 120 |
| 121 SetFontAndTextDirection(&localized_strings); |
| 122 |
| 121 static const base::StringPiece extensions_html( | 123 static const base::StringPiece extensions_html( |
| 122 ResourceBundle::GetSharedInstance().GetRawDataResource( | 124 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 123 IDR_EXTENSIONS_UI_HTML)); | 125 IDR_EXTENSIONS_UI_HTML)); |
| 124 std::string full_html(extensions_html.data(), extensions_html.size()); | 126 std::string full_html(extensions_html.data(), extensions_html.size()); |
| 125 jstemplate_builder::AppendJsonHtml(&localized_strings, &full_html); | 127 jstemplate_builder::AppendJsonHtml(&localized_strings, &full_html); |
| 126 jstemplate_builder::AppendI18nTemplateSourceHtml(&full_html); | 128 jstemplate_builder::AppendI18nTemplateSourceHtml(&full_html); |
| 127 jstemplate_builder::AppendI18nTemplateProcessHtml(&full_html); | 129 jstemplate_builder::AppendI18nTemplateProcessHtml(&full_html); |
| 128 jstemplate_builder::AppendJsTemplateSourceHtml(&full_html); | 130 jstemplate_builder::AppendJsTemplateSourceHtml(&full_html); |
| 129 | 131 |
| 130 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); | 132 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 // static | 747 // static |
| 746 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 748 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
| 747 return ResourceBundle::GetSharedInstance(). | 749 return ResourceBundle::GetSharedInstance(). |
| 748 LoadImageResourceBytes(IDR_PLUGIN); | 750 LoadImageResourceBytes(IDR_PLUGIN); |
| 749 } | 751 } |
| 750 | 752 |
| 751 // static | 753 // static |
| 752 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 754 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
| 753 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); | 755 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); |
| 754 } | 756 } |
| OLD | NEW |