summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 08:38:36 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 08:38:36 +0000
commit3a3b75ab9cc13b9acb466de0ef1bc7036756fce4 (patch)
treeb58f4946657cc25dfc6f667e10aad16f070be5b4 /content/common
parent75001aab2af6da7c04d30daf3019f0dba4982432 (diff)
downloadchromium_src-3a3b75ab9cc13b9acb466de0ef1bc7036756fce4.zip
chromium_src-3a3b75ab9cc13b9acb466de0ef1bc7036756fce4.tar.gz
chromium_src-3a3b75ab9cc13b9acb466de0ef1bc7036756fce4.tar.bz2
Pass user gesture indicator for RPH and intents.
We are moving to a policy which will change where we show RPH and web intents registrations between infobar and page-action type indicator depending on factors like user gesture, previous showing of the infobar, and perhaps other considerations. This change gets that user gesture indicator to the policy logic. It also incorporates a change to the web intents registration IPC to pass the service info struct instead of individual members. (Adding the user gesture went over the param limit, and passing the struct is a good change regardless.) R=groby@chromium.org,jam@chromium.org BUG=119438 TEST=*WebIntent*.* Review URL: https://chromiumcodereview.appspot.com/10447067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/intents_messages.h19
-rw-r--r--content/common/view_messages.h5
2 files changed, 16 insertions, 8 deletions
diff --git a/content/common/intents_messages.h b/content/common/intents_messages.h
index fd2866d..8e648d5 100644
--- a/content/common/intents_messages.h
+++ b/content/common/intents_messages.h
@@ -10,6 +10,7 @@
#include "ipc/param_traits_macros.h"
#include "webkit/glue/web_intent_data.h"
#include "webkit/glue/web_intent_reply_data.h"
+#include "webkit/glue/web_intent_service_data.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@@ -17,6 +18,7 @@
IPC_ENUM_TRAITS(webkit_glue::WebIntentReplyType)
IPC_ENUM_TRAITS(webkit_glue::WebIntentData::DataType)
+IPC_ENUM_TRAITS(webkit_glue::WebIntentServiceData::Disposition)
IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebIntentData)
IPC_STRUCT_TRAITS_MEMBER(action)
@@ -32,6 +34,14 @@ IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebIntentData)
IPC_STRUCT_TRAITS_MEMBER(data_type)
IPC_STRUCT_TRAITS_END()
+IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebIntentServiceData)
+ IPC_STRUCT_TRAITS_MEMBER(service_url)
+ IPC_STRUCT_TRAITS_MEMBER(action)
+ IPC_STRUCT_TRAITS_MEMBER(type)
+ IPC_STRUCT_TRAITS_MEMBER(title)
+ IPC_STRUCT_TRAITS_MEMBER(disposition)
+IPC_STRUCT_TRAITS_END()
+
// Set the intent data to be set on the service page.
IPC_MESSAGE_ROUTED1(IntentsMsg_SetWebIntentData,
webkit_glue::WebIntentData)
@@ -53,9 +63,6 @@ IPC_MESSAGE_ROUTED2(IntentsHostMsg_WebIntentDispatch,
int /* intent ID */)
// Register a new service for Intents with the given action and type filter.
-IPC_MESSAGE_ROUTED5(IntentsHostMsg_RegisterIntentService,
- string16 /* action */,
- string16 /* type */,
- string16 /* href */,
- string16 /* title */,
- string16 /* disposition */)
+IPC_MESSAGE_ROUTED2(IntentsHostMsg_RegisterIntentService,
+ webkit_glue::WebIntentServiceData,
+ bool /* user_gesture */)
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 0e461f5..0870e02 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -2021,10 +2021,11 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_SaveURLAs,
IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory)
// Register a new handler for URL requests with the given scheme.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler,
+IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
std::string /* scheme */,
GURL /* url */,
- string16 /* title */)
+ string16 /* title */,
+ bool /* user_gesture */)
// Stores new inspector setting in the profile.
// TODO(jam): this should be in the chrome module