OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GLUE_WEB_INTENT_DATA_H_ | 5 #ifndef WEBKIT_GLUE_WEB_INTENT_DATA_H_ |
6 #define WEBKIT_GLUE_WEB_INTENT_DATA_H_ | 6 #define WEBKIT_GLUE_WEB_INTENT_DATA_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "webkit/glue/webkit_glue_export.h" | 9 #include "webkit/glue/webkit_glue_export.h" |
10 | 10 |
11 namespace WebKit { | 11 namespace WebKit { |
12 class WebIntent; | 12 class WebIntent; |
13 } | 13 } |
14 | 14 |
15 namespace webkit_glue { | 15 namespace webkit_glue { |
16 | 16 |
17 // Representation of the Web Intent data being initiated or delivered. | 17 // Representation of the Web Intent data being initiated or delivered. |
18 struct WEBKIT_GLUE_EXPORT WebIntentData { | 18 struct WEBKIT_GLUE_EXPORT WebIntentData { |
19 // The action of the intent. | 19 // The action of the intent. |
20 string16 action; | 20 string16 action; |
21 // The MIME type of data in this intent payload. | 21 // The MIME type of data in this intent payload. |
22 string16 type; | 22 string16 type; |
23 // The representation of the payload data. Wire format is from | 23 // The representation of the payload data. Wire format is from |
24 // SerializedScriptObject. | 24 // SerializedScriptObject. |
25 string16 data; | 25 string16 data; |
26 | 26 |
27 // String payload data. | |
28 string16 unserialized_data; | |
29 | |
30 enum { | |
31 SERIALIZED = 0, | |
32 UNSERIALIZED = 1 | |
33 }; | |
34 int data_type; | |
James Hawkins
2012/03/12 23:19:11
Can we not use a named enum for this?
Greg Billock
2012/03/12 23:52:22
Done.
| |
35 | |
27 WebIntentData(); | 36 WebIntentData(); |
28 WebIntentData(const WebKit::WebIntent& intent); | 37 WebIntentData(const WebKit::WebIntent& intent); |
38 WebIntentData(const string16& action_in, | |
39 const string16& type_in, | |
40 const string16& unserialized_data_in); | |
29 ~WebIntentData(); | 41 ~WebIntentData(); |
30 }; | 42 }; |
31 | 43 |
32 } // namespace webkit_glue | 44 } // namespace webkit_glue |
33 | 45 |
34 #endif // WEBKIT_GLUE_WEB_INTENT_DATA_H_ | 46 #endif // WEBKIT_GLUE_WEB_INTENT_DATA_H_ |
OLD | NEW |