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

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

Issue 501130: Revert 34858 - Merge 34812 Add the rightclick context menu for Browser actio... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 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) 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 const ListValue* list = static_cast<const ListValue*>(value); 396 const ListValue* list = static_cast<const ListValue*>(value);
397 CHECK(list->GetSize() == 1); 397 CHECK(list->GetSize() == 1);
398 std::string extension_id; 398 std::string extension_id;
399 CHECK(list->GetString(0, &extension_id)); 399 CHECK(list->GetString(0, &extension_id));
400 400
401 Extension *extension = 401 Extension *extension =
402 extensions_service_->GetExtensionById(extension_id, true); 402 extensions_service_->GetExtensionById(extension_id, true);
403 if (!extension) 403 if (!extension)
404 return; 404 return;
405 405
406 FilePath icon_path =
407 extension->GetIconPath(Extension::EXTENSION_ICON_LARGE).GetFilePath();
406 scoped_ptr<SkBitmap> uninstall_icon; 408 scoped_ptr<SkBitmap> uninstall_icon;
407 Extension::DecodeIcon(extension, Extension::EXTENSION_ICON_LARGE, 409 CrxInstaller::DecodeInstallIcon(icon_path, &uninstall_icon);
408 &uninstall_icon);
409 410
410 extension_id_uninstalling_ = extension_id; 411 extension_id_uninstalling_ = extension_id;
411 ExtensionInstallUI client(dom_ui_->GetProfile()); 412 ExtensionInstallUI client(dom_ui_->GetProfile());
412 client.ConfirmUninstall(this, extension, uninstall_icon.get()); 413 client.ConfirmUninstall(this, extension, uninstall_icon.get());
413 } 414 }
414 415
415 void ExtensionsDOMHandler::InstallUIProceed() { 416 void ExtensionsDOMHandler::InstallUIProceed() {
416 extensions_service_->UninstallExtension(extension_id_uninstalling_, false); 417 extensions_service_->UninstallExtension(extension_id_uninstalling_, false);
417 extension_id_uninstalling_ = ""; 418 extension_id_uninstalling_ = "";
418 } 419 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // static 748 // static
748 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 749 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
749 return ResourceBundle::GetSharedInstance(). 750 return ResourceBundle::GetSharedInstance().
750 LoadImageResourceBytes(IDR_PLUGIN); 751 LoadImageResourceBytes(IDR_PLUGIN);
751 } 752 }
752 753
753 // static 754 // static
754 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 755 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
755 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 756 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
756 } 757 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_disabled_infobar_delegate.cc ('k') | chrome/browser/views/browser_actions_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698