OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/views/extensions/extension_action_context_menu.h" | 5 #include "chrome/browser/views/extensions/extension_action_context_menu.h" |
6 | 6 |
7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
8 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
9 #include "chrome/browser/extensions/extensions_service.h" | 9 #include "chrome/browser/extensions/extensions_service.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 context_menu_menu_.reset(new views::Menu2(context_menu_contents_.get())); | 25 context_menu_menu_.reset(new views::Menu2(context_menu_contents_.get())); |
26 context_menu_menu_->RunContextMenuAt(point); | 26 context_menu_menu_->RunContextMenuAt(point); |
27 } | 27 } |
28 | 28 |
29 void ExtensionActionContextMenu::InstallUIProceed() { | 29 void ExtensionActionContextMenu::InstallUIProceed() { |
30 // TODO(finnur): GetLastActive returns NULL in unit tests. | 30 // TODO(finnur): GetLastActive returns NULL in unit tests. |
31 Browser* browser = BrowserList::GetLastActive(); | 31 Browser* browser = BrowserList::GetLastActive(); |
32 std::string id = extension_->id(); | 32 std::string id = extension_->id(); |
33 browser->profile()->GetExtensionsService()->UninstallExtension(id, false); | 33 browser->profile()->GetExtensionsService()->UninstallExtension(id, false); |
34 } | 34 } |
OLD | NEW |