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

Unified Diff: chrome/browser/extensions/api/extension_action/extension_action_api.cc

Issue 148153008: Protocol handler dialogs should only be enabled by browser or page actions [Not committed] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/extension_action/extension_action_api.cc
diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.cc b/chrome/browser/extensions/api/extension_action/extension_action_api.cc
index a7e077566d901ed4502cefc6262dbb1cb1d47f27..13906db27c0f66bc2ee2097be903a316d1377ed8 100644
--- a/chrome/browser/extensions/api/extension_action/extension_action_api.cc
+++ b/chrome/browser/extensions/api/extension_action/extension_action_api.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/extensions/location_bar_controller.h"
#include "chrome/browser/extensions/state_store.h"
#include "chrome/browser/extensions/tab_helper.h"
+#include "chrome/browser/external_protocol/external_protocol_handler.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/extension_action/action_info.h"
#include "chrome/common/render_messages.h"
@@ -354,7 +355,9 @@ void ExtensionActionAPI::ExtensionActionExecuted(
// The System Indicator handles its own clicks.
break;
}
-
+ // Browser and page actions should enable launching external protocol
+ // handlers in the absence of any other user gesture.
+ ExternalProtocolHandler::PermitLaunchUrl();
Jeffrey Yasskin 2014/01/28 00:54:19 The other place I'd expect people to be relying on
meacer 2014/01/30 00:20:44 Just to clarify: If postMessage wasn't called from
if (event_name) {
scoped_ptr<base::ListValue> args(new base::ListValue());
base::DictionaryValue* tab_value =
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698