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

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

Issue 501136: Merge 34812 - Add the rightclick context menu for Browser actions and Page... (Closed) Base URL: svn://chrome-svn/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();
408 scoped_ptr<SkBitmap> uninstall_icon; 406 scoped_ptr<SkBitmap> uninstall_icon;
409 CrxInstaller::DecodeInstallIcon(icon_path, &uninstall_icon); 407 Extension::DecodeIcon(extension, Extension::EXTENSION_ICON_LARGE,
408 &uninstall_icon);
410 409
411 extension_id_uninstalling_ = extension_id; 410 extension_id_uninstalling_ = extension_id;
412 ExtensionInstallUI client(dom_ui_->GetProfile()); 411 ExtensionInstallUI client(dom_ui_->GetProfile());
413 client.ConfirmUninstall(this, extension, uninstall_icon.get()); 412 client.ConfirmUninstall(this, extension, uninstall_icon.get());
414 } 413 }
415 414
416 void ExtensionsDOMHandler::InstallUIProceed() { 415 void ExtensionsDOMHandler::InstallUIProceed() {
417 extensions_service_->UninstallExtension(extension_id_uninstalling_, false); 416 extensions_service_->UninstallExtension(extension_id_uninstalling_, false);
418 extension_id_uninstalling_ = ""; 417 extension_id_uninstalling_ = "";
419 } 418 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 // static 747 // static
749 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 748 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
750 return ResourceBundle::GetSharedInstance(). 749 return ResourceBundle::GetSharedInstance().
751 LoadImageResourceBytes(IDR_PLUGIN); 750 LoadImageResourceBytes(IDR_PLUGIN);
752 } 751 }
753 752
754 // static 753 // static
755 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 754 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
756 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 755 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
757 } 756 }
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