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

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

Issue 419023002: Move ShowPopup logic from BrowserActionsContainer to BrowserActionView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 extensions::ExtensionUninstallDialog::Create( 128 extensions::ExtensionUninstallDialog::Create(
129 profile_, browser_->window()->GetNativeWindow(), this)); 129 profile_, browser_->window()->GetNativeWindow(), this));
130 extension_uninstall_dialog_->ConfirmUninstall(extension); 130 extension_uninstall_dialog_->ConfirmUninstall(extension);
131 break; 131 break;
132 } 132 }
133 case MANAGE: { 133 case MANAGE: {
134 chrome::ShowExtensions(browser_, extension->id()); 134 chrome::ShowExtensions(browser_, extension->id());
135 break; 135 break;
136 } 136 }
137 case INSPECT_POPUP: { 137 case INSPECT_POPUP: {
138 delegate_->InspectPopup(extension_action_); 138 delegate_->InspectPopup();
139 break; 139 break;
140 } 140 }
141 default: 141 default:
142 NOTREACHED() << "Unknown option"; 142 NOTREACHED() << "Unknown option";
143 break; 143 break;
144 } 144 }
145 } 145 }
146 146
147 void ExtensionContextMenuModel::ExtensionUninstallAccepted() { 147 void ExtensionContextMenuModel::ExtensionUninstallAccepted() {
148 if (GetExtension()) { 148 if (GetExtension()) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON); 181 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON);
182 AddSeparator(ui::NORMAL_SEPARATOR); 182 AddSeparator(ui::NORMAL_SEPARATOR);
183 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSION); 183 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSION);
184 } 184 }
185 185
186 const Extension* ExtensionContextMenuModel::GetExtension() const { 186 const Extension* ExtensionContextMenuModel::GetExtension() const {
187 ExtensionService* extension_service = 187 ExtensionService* extension_service =
188 extensions::ExtensionSystem::Get(profile_)->extension_service(); 188 extensions::ExtensionSystem::Get(profile_)->extension_service();
189 return extension_service->GetExtensionById(extension_id_, false); 189 return extension_service->GetExtensionById(extension_id_, false);
190 } 190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698