OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" |
6 | 6 |
7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_tabs_module.h" | 10 #include "chrome/browser/extensions/extension_tabs_module.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 case kExtensionContextUninstall: { | 258 case kExtensionContextUninstall: { |
259 uninstaller_.reset(new AsyncUninstaller(extension_, profile_)); | 259 uninstaller_.reset(new AsyncUninstaller(extension_, profile_)); |
260 break; | 260 break; |
261 } | 261 } |
262 case kExtensionContextHide: { | 262 case kExtensionContextHide: { |
263 ExtensionService* extension_service = profile_->GetExtensionService(); | 263 ExtensionService* extension_service = profile_->GetExtensionService(); |
264 extension_service->SetBrowserActionVisibility(extension_, false); | 264 extension_service->SetBrowserActionVisibility(extension_, false); |
265 break; | 265 break; |
266 } | 266 } |
267 case kExtensionContextManage: { | 267 case kExtensionContextManage: { |
268 browser->OpenURL(GURL(chrome::kChromeUIExtensionsURL), GURL(), | 268 browser->ShowOptionsTab(chrome::kExtensionsSubPage); |
269 NEW_FOREGROUND_TAB, PageTransition::LINK); | |
270 break; | 269 break; |
271 } | 270 } |
272 case kExtensionContextInspect: { | 271 case kExtensionContextInspect: { |
273 BrowserWindowCocoa* window = | 272 BrowserWindowCocoa* window = |
274 static_cast<BrowserWindowCocoa*>(browser->window()); | 273 static_cast<BrowserWindowCocoa*>(browser->window()); |
275 ToolbarController* toolbarController = | 274 ToolbarController* toolbarController = |
276 [window->cocoa_controller() toolbarController]; | 275 [window->cocoa_controller() toolbarController]; |
277 LocationBarViewMac* locationBarView = | 276 LocationBarViewMac* locationBarView = |
278 [toolbarController locationBarBridge]; | 277 [toolbarController locationBarBridge]; |
279 | 278 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 } | 315 } |
317 return YES; | 316 return YES; |
318 } | 317 } |
319 | 318 |
320 - (void)invalidateProfile { | 319 - (void)invalidateProfile { |
321 observer_.reset(); | 320 observer_.reset(); |
322 profile_ = NULL; | 321 profile_ = NULL; |
323 } | 322 } |
324 | 323 |
325 @end | 324 @end |
OLD | NEW |