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

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: . 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
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 9ba6f5428a0984a372fcf25ab88c620a4efa7b02..00f5e983b27096295d030a1a3d857753707db8c8 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"
@@ -51,6 +52,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

Powered by Google App Engine
This is Rietveld 408576698