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

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

Issue 307413002: Move ExtensionUninstallDialog into extensions namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extension_context_menu_model.h" 5 #include "chrome/browser/extensions/extension_context_menu_model.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
10 #include "chrome/browser/extensions/extension_action.h" 10 #include "chrome/browser/extensions/extension_action.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 extensions::ExtensionTabUtil::OpenOptionsPage(extension, browser_); 116 extensions::ExtensionTabUtil::OpenOptionsPage(extension, browser_);
117 break; 117 break;
118 case HIDE: { 118 case HIDE: {
119 extensions::ExtensionActionAPI::SetBrowserActionVisibility( 119 extensions::ExtensionActionAPI::SetBrowserActionVisibility(
120 extensions::ExtensionPrefs::Get(profile_), extension->id(), false); 120 extensions::ExtensionPrefs::Get(profile_), extension->id(), false);
121 break; 121 break;
122 } 122 }
123 case UNINSTALL: { 123 case UNINSTALL: {
124 AddRef(); // Balanced in Accepted() and Canceled() 124 AddRef(); // Balanced in Accepted() and Canceled()
125 extension_uninstall_dialog_.reset( 125 extension_uninstall_dialog_.reset(
126 ExtensionUninstallDialog::Create(profile_, browser_, this)); 126 extensions::ExtensionUninstallDialog::Create(
127 profile_, browser_, this));
127 extension_uninstall_dialog_->ConfirmUninstall(extension); 128 extension_uninstall_dialog_->ConfirmUninstall(extension);
128 break; 129 break;
129 } 130 }
130 case MANAGE: { 131 case MANAGE: {
131 chrome::ShowExtensions(browser_, extension->id()); 132 chrome::ShowExtensions(browser_, extension->id());
132 break; 133 break;
133 } 134 }
134 case INSPECT_POPUP: { 135 case INSPECT_POPUP: {
135 delegate_->InspectPopup(extension_action_); 136 delegate_->InspectPopup(extension_action_);
136 break; 137 break;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON); 177 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON);
177 AddSeparator(ui::NORMAL_SEPARATOR); 178 AddSeparator(ui::NORMAL_SEPARATOR);
178 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSION); 179 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSION);
179 } 180 }
180 181
181 const Extension* ExtensionContextMenuModel::GetExtension() const { 182 const Extension* ExtensionContextMenuModel::GetExtension() const {
182 ExtensionService* extension_service = 183 ExtensionService* extension_service =
183 extensions::ExtensionSystem::Get(profile_)->extension_service(); 184 extensions::ExtensionSystem::Get(profile_)->extension_service();
184 return extension_service->GetExtensionById(extension_id_, false); 185 return extension_service->GetExtensionById(extension_id_, false);
185 } 186 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model.h ('k') | chrome/browser/extensions/extension_disabled_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698