summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 22:35:47 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 22:35:47 +0000
commitb14822c2ddc4a665a64ee1922f7e68bf66a900b4 (patch)
treec1a6f5439d37ab2e72ad67b94985dbc9c2a6a1fc /webkit/glue
parentb2a8a90042d145ddc2b97363ae2139a17ed1953e (diff)
downloadchromium_src-b14822c2ddc4a665a64ee1922f7e68bf66a900b4.zip
chromium_src-b14822c2ddc4a665a64ee1922f7e68bf66a900b4.tar.gz
chromium_src-b14822c2ddc4a665a64ee1922f7e68bf66a900b4.tar.bz2
An internal intents dispatcher useful for initiating an intent from the browser process.
R=jhawkins@chromium.org,jam@chromium.org BUG=105732 TEST=InternalWebIntentsDispatcherTest Review URL: http://codereview.chromium.org/9692017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/web_intent_data.cc17
-rw-r--r--webkit/glue/web_intent_data.h16
2 files changed, 29 insertions, 4 deletions
diff --git a/webkit/glue/web_intent_data.cc b/webkit/glue/web_intent_data.cc
index 7b3406a..663b9be 100644
--- a/webkit/glue/web_intent_data.cc
+++ b/webkit/glue/web_intent_data.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,8 @@
namespace webkit_glue {
-WebIntentData::WebIntentData() {
+WebIntentData::WebIntentData()
+ : data_type(SERIALIZED) {
}
WebIntentData::~WebIntentData() {
@@ -17,7 +18,17 @@ WebIntentData::~WebIntentData() {
WebIntentData::WebIntentData(const WebKit::WebIntent& intent)
: action(intent.action()),
type(intent.type()),
- data(intent.data()) {
+ data(intent.data()),
+ data_type(SERIALIZED) {
+}
+
+WebIntentData::WebIntentData(const string16& action_in,
+ const string16& type_in,
+ const string16& unserialized_data_in)
+ : action(action_in),
+ type(type_in),
+ unserialized_data(unserialized_data_in),
+ data_type(UNSERIALIZED) {
}
} // namespace webkit_glue
diff --git a/webkit/glue/web_intent_data.h b/webkit/glue/web_intent_data.h
index 540cd15..78972de 100644
--- a/webkit/glue/web_intent_data.h
+++ b/webkit/glue/web_intent_data.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -24,8 +24,22 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
// SerializedScriptObject.
string16 data;
+ // String payload data.
+ string16 unserialized_data;
+
+ // These enum values indicate which payload data type should be used.
+ enum DataType {
+ SERIALIZED = 0, // The payload is serialized in |data|.
+ UNSERIALIZED = 1 // The payload is unseriazed in |unserialized_data|.
+ };
+ // Which data payload to use when delivering the intent.
+ DataType data_type;
+
WebIntentData();
WebIntentData(const WebKit::WebIntent& intent);
+ WebIntentData(const string16& action_in,
+ const string16& type_in,
+ const string16& unserialized_data_in);
~WebIntentData();
};