| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 8 #include <map> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 11 #include "base/string16.h" | 12 #include "base/string16.h" |
| 12 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 13 #include "webkit/glue/webkit_glue_export.h" | 14 #include "webkit/glue/webkit_glue_export.h" |
| 14 | 15 |
| 15 namespace WebKit { | 16 namespace WebKit { |
| 16 class WebIntent; | 17 class WebIntent; |
| 17 } | 18 } |
| 18 | 19 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 30 // Any extra key-value pair metadata. (Not serialized.) | 31 // Any extra key-value pair metadata. (Not serialized.) |
| 31 std::map<string16, string16> extra_data; | 32 std::map<string16, string16> extra_data; |
| 32 | 33 |
| 33 // Set to the service page if this intent data is from an explicit intent | 34 // Set to the service page if this intent data is from an explicit intent |
| 34 // invocation. |service.is_valid()| will be false otherwise. | 35 // invocation. |service.is_valid()| will be false otherwise. |
| 35 GURL service; | 36 GURL service; |
| 36 | 37 |
| 37 // String payload data. | 38 // String payload data. |
| 38 string16 unserialized_data; | 39 string16 unserialized_data; |
| 39 | 40 |
| 41 // The global message port IDs of any transferred MessagePorts. |
| 42 std::vector<int> message_port_ids; |
| 43 |
| 40 // The file of a payload blob. Together with |blob_length|, suitable | 44 // The file of a payload blob. Together with |blob_length|, suitable |
| 41 // arguments to WebBlob::createFromFile. | 45 // arguments to WebBlob::createFromFile. |
| 42 FilePath blob_file; | 46 FilePath blob_file; |
| 43 // Length of the blob. | 47 // Length of the blob. |
| 44 int64 blob_length; | 48 int64 blob_length; |
| 45 | 49 |
| 46 // These enum values indicate which payload data type should be used. | 50 // These enum values indicate which payload data type should be used. |
| 47 enum DataType { | 51 enum DataType { |
| 48 SERIALIZED = 0, // The payload is serialized in |data|. | 52 SERIALIZED = 0, // The payload is serialized in |data|. |
| 49 UNSERIALIZED = 1, // The payload is unserialized in |unserialized_data|. | 53 UNSERIALIZED = 1, // The payload is unserialized in |unserialized_data|. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 60 WebIntentData(const string16& action_in, | 64 WebIntentData(const string16& action_in, |
| 61 const string16& type_in, | 65 const string16& type_in, |
| 62 const FilePath& blob_file_in, | 66 const FilePath& blob_file_in, |
| 63 int64 blob_length_in); | 67 int64 blob_length_in); |
| 64 ~WebIntentData(); | 68 ~WebIntentData(); |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 } // namespace webkit_glue | 71 } // namespace webkit_glue |
| 68 | 72 |
| 69 #endif // WEBKIT_GLUE_WEB_INTENT_DATA_H_ | 73 #endif // WEBKIT_GLUE_WEB_INTENT_DATA_H_ |
| OLD | NEW |