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 11246003: Remove Profile->GetExtensionProcessManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix extension_crash_recovery_browsertest Created 8 years, 2 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 | Annotate | Revision Log
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/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_action.h" 8 #include "chrome/browser/extensions/extension_action.h"
9 #include "chrome/browser/extensions/extension_action_manager.h" 9 #include "chrome/browser/extensions/extension_action_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 switch (command_id) { 100 switch (command_id) {
101 case NAME: { 101 case NAME: {
102 OpenURLParams params(extension->GetHomepageURL(), Referrer(), 102 OpenURLParams params(extension->GetHomepageURL(), Referrer(),
103 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, 103 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK,
104 false); 104 false);
105 browser_->OpenURL(params); 105 browser_->OpenURL(params);
106 break; 106 break;
107 } 107 }
108 case CONFIGURE: 108 case CONFIGURE:
109 DCHECK(!extension->options_url().is_empty()); 109 DCHECK(!extension->options_url().is_empty());
110 profile_->GetExtensionProcessManager()->OpenOptionsPage(extension, 110 extensions::ExtensionSystem::Get(profile_)->process_manager()->
111 browser_); 111 OpenOptionsPage(extension, browser_);
112 break; 112 break;
113 case HIDE: { 113 case HIDE: {
114 ExtensionService* extension_service = profile_->GetExtensionService(); 114 ExtensionService* extension_service = profile_->GetExtensionService();
115 extension_service->extension_prefs()-> 115 extension_service->extension_prefs()->
116 SetBrowserActionVisibility(extension, false); 116 SetBrowserActionVisibility(extension, false);
117 break; 117 break;
118 } 118 }
119 case DISABLE: { 119 case DISABLE: {
120 ExtensionService* extension_service = profile_->GetExtensionService(); 120 ExtensionService* extension_service = profile_->GetExtensionService();
121 extension_service->DisableExtension(extension_id_, 121 extension_service->DisableExtension(extension_id_,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (extension_action_manager->GetBrowserAction(*extension)) 174 if (extension_action_manager->GetBrowserAction(*extension))
175 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON); 175 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON);
176 AddSeparator(ui::NORMAL_SEPARATOR); 176 AddSeparator(ui::NORMAL_SEPARATOR);
177 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS); 177 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSIONS);
178 } 178 }
179 179
180 const Extension* ExtensionContextMenuModel::GetExtension() const { 180 const Extension* ExtensionContextMenuModel::GetExtension() const {
181 ExtensionService* extension_service = profile_->GetExtensionService(); 181 ExtensionService* extension_service = profile_->GetExtensionService();
182 return extension_service->GetExtensionById(extension_id_, false); 182 return extension_service->GetExtensionById(extension_id_, false);
183 } 183 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_crash_recovery_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698