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

Unified Diff: chrome/browser/extensions/page_action_controller.cc

Issue 10535155: Hook the activeTab permission up to the omnibox, page action, and context menu APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_menu_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/page_action_controller.cc
diff --git a/chrome/browser/extensions/page_action_controller.cc b/chrome/browser/extensions/page_action_controller.cc
index 59157a893c120a0dc74f12717317a0ddd87878f5..255e4ba4aef8ffa7530311da27981dcb88c86c4e 100644
--- a/chrome/browser/extensions/page_action_controller.cc
+++ b/chrome/browser/extensions/page_action_controller.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/extensions/extension_browser_event_router.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/extensions/extension_set.h"
@@ -49,6 +50,9 @@ LocationBarController::Action PageActionController::OnClicked(
CHECK(page_action);
int tab_id = ExtensionTabUtil::GetTabId(tab_contents_->web_contents());
+ tab_contents_->extension_tab_helper()->active_tab_permission_manager()->
+ GrantIfRequested(extension);
+
switch (mouse_button) {
case 1: // left
case 2: // middle
« no previous file with comments | « chrome/browser/extensions/extension_menu_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698