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

Side by Side Diff: chrome/browser/extensions/extensions_ui.cc

Issue 411004: Special case the gallery to not show the scary download roadblock. (Closed)
Patch Set: add comments Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/common/extensions/extension.h » ('j') | 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) 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"
11 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/thread.h" 14 #include "base/thread.h"
15 #include "chrome/browser/browser.h" 15 #include "chrome/browser/browser.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/debugger/devtools_manager.h" 17 #include "chrome/browser/debugger/devtools_manager.h"
18 #include "chrome/browser/extensions/crx_installer.h" 18 #include "chrome/browser/extensions/crx_installer.h"
19 #include "chrome/browser/extensions/extension_function_dispatcher.h" 19 #include "chrome/browser/extensions/extension_function_dispatcher.h"
20 #include "chrome/browser/extensions/extension_message_service.h" 20 #include "chrome/browser/extensions/extension_message_service.h"
21 #include "chrome/browser/extensions/extensions_service.h" 21 #include "chrome/browser/extensions/extensions_service.h"
22 #include "chrome/browser/extensions/extension_updater.h" 22 #include "chrome/browser/extensions/extension_updater.h"
23 #include "chrome/browser/profile.h" 23 #include "chrome/browser/profile.h"
24 #include "chrome/browser/renderer_host/render_process_host.h" 24 #include "chrome/browser/renderer_host/render_process_host.h"
25 #include "chrome/browser/renderer_host/render_widget_host.h" 25 #include "chrome/browser/renderer_host/render_widget_host.h"
26 #include "chrome/browser/renderer_host/render_view_host.h" 26 #include "chrome/browser/renderer_host/render_view_host.h"
27 #include "chrome/browser/tab_contents/tab_contents.h" 27 #include "chrome/browser/tab_contents/tab_contents.h"
28 #include "chrome/browser/tab_contents/tab_contents_view.h" 28 #include "chrome/browser/tab_contents/tab_contents_view.h"
29 #include "chrome/common/extensions/extension.h" 29 #include "chrome/common/extensions/extension.h"
30 #include "chrome/common/extensions/extension_constants.h"
30 #include "chrome/common/extensions/extension_error_reporter.h" 31 #include "chrome/common/extensions/extension_error_reporter.h"
31 #include "chrome/common/extensions/user_script.h" 32 #include "chrome/common/extensions/user_script.h"
32 #include "chrome/common/extensions/url_pattern.h" 33 #include "chrome/common/extensions/url_pattern.h"
33 #include "chrome/common/jstemplate_builder.h" 34 #include "chrome/common/jstemplate_builder.h"
34 #include "chrome/common/notification_service.h" 35 #include "chrome/common/notification_service.h"
35 #include "chrome/common/notification_type.h" 36 #include "chrome/common/notification_type.h"
36 #include "chrome/common/pref_names.h" 37 #include "chrome/common/pref_names.h"
37 #include "chrome/common/pref_service.h" 38 #include "chrome/common/pref_service.h"
38 #include "chrome/common/url_constants.h" 39 #include "chrome/common/url_constants.h"
39 #include "grit/browser_resources.h" 40 #include "grit/browser_resources.h"
(...skipping 25 matching lines...) Expand all
65 localized_strings.SetString(L"loadUnpackedButton", 66 localized_strings.SetString(L"loadUnpackedButton",
66 l10n_util::GetString(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON)); 67 l10n_util::GetString(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON));
67 localized_strings.SetString(L"packButton", 68 localized_strings.SetString(L"packButton",
68 l10n_util::GetString(IDS_EXTENSIONS_PACK_BUTTON)); 69 l10n_util::GetString(IDS_EXTENSIONS_PACK_BUTTON));
69 localized_strings.SetString(L"updateButton", 70 localized_strings.SetString(L"updateButton",
70 l10n_util::GetString(IDS_EXTENSIONS_UPDATE_BUTTON)); 71 l10n_util::GetString(IDS_EXTENSIONS_UPDATE_BUTTON));
71 localized_strings.SetString(L"noExtensions", 72 localized_strings.SetString(L"noExtensions",
72 l10n_util::GetString(IDS_EXTENSIONS_NONE_INSTALLED)); 73 l10n_util::GetString(IDS_EXTENSIONS_NONE_INSTALLED));
73 localized_strings.SetString(L"suggestGallery", 74 localized_strings.SetString(L"suggestGallery",
74 l10n_util::GetStringF(IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY, 75 l10n_util::GetStringF(IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY,
75 std::wstring(L"<a href='") + 76 std::wstring(L"<a href='") +
76 ASCIIToWide(Extension::kGalleryBrowseUrl) + 77 ASCIIToWide(extension_urls::kGalleryBrowsePrefix) +
77 L"'>", 78 L"'>",
78 L"</a>")); 79 L"</a>"));
79 localized_strings.SetString(L"getMoreExtensions", 80 localized_strings.SetString(L"getMoreExtensions",
80 std::wstring(L"<a href='") + 81 std::wstring(L"<a href='") +
81 ASCIIToWide(Extension::kGalleryBrowseUrl) + 82 ASCIIToWide(extension_urls::kGalleryBrowsePrefix) +
82 L"'>" + 83 L"'>" +
83 l10n_util::GetString(IDS_GET_MORE_EXTENSIONS) + 84 l10n_util::GetString(IDS_GET_MORE_EXTENSIONS) +
84 L"</a>"); 85 L"</a>");
85 localized_strings.SetString(L"extensionDisabled", 86 localized_strings.SetString(L"extensionDisabled",
86 l10n_util::GetString(IDS_EXTENSIONS_DISABLED_EXTENSION)); 87 l10n_util::GetString(IDS_EXTENSIONS_DISABLED_EXTENSION));
87 localized_strings.SetString(L"inDevelopment", 88 localized_strings.SetString(L"inDevelopment",
88 l10n_util::GetString(IDS_EXTENSIONS_IN_DEVELOPMENT)); 89 l10n_util::GetString(IDS_EXTENSIONS_IN_DEVELOPMENT));
89 localized_strings.SetString(L"extensionId", 90 localized_strings.SetString(L"extensionId",
90 l10n_util::GetString(IDS_EXTENSIONS_ID)); 91 l10n_util::GetString(IDS_EXTENSIONS_ID));
91 localized_strings.SetString(L"extensionVersion", 92 localized_strings.SetString(L"extensionVersion",
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 // static 745 // static
745 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 746 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
746 return ResourceBundle::GetSharedInstance(). 747 return ResourceBundle::GetSharedInstance().
747 LoadImageResourceBytes(IDR_PLUGIN); 748 LoadImageResourceBytes(IDR_PLUGIN);
748 } 749 }
749 750
750 // static 751 // static
751 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 752 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
752 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 753 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
753 } 754 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698