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 #include <vector> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // The global message port IDs of any transferred MessagePorts. | 44 // The global message port IDs of any transferred MessagePorts. |
45 std::vector<int> message_port_ids; | 45 std::vector<int> message_port_ids; |
46 | 46 |
47 // The file of a payload blob. Together with |blob_length|, suitable | 47 // The file of a payload blob. Together with |blob_length|, suitable |
48 // arguments to WebBlob::createFromFile. | 48 // arguments to WebBlob::createFromFile. |
49 FilePath blob_file; | 49 FilePath blob_file; |
50 // Length of the blob. | 50 // Length of the blob. |
51 int64 blob_length; | 51 int64 blob_length; |
52 | 52 |
53 // Store the file system parameters to create a new file system. | 53 // Store the file system parameters to create a new file system. |
54 FilePath root_path; | 54 std::string root_name; |
55 std::string filesystem_id; | 55 std::string filesystem_id; |
56 | 56 |
57 // These enum values indicate which payload data type should be used. | 57 // These enum values indicate which payload data type should be used. |
58 enum DataType { | 58 enum DataType { |
59 SERIALIZED = 0, // The payload is serialized in |data|. | 59 SERIALIZED = 0, // The payload is serialized in |data|. |
60 UNSERIALIZED = 1, // The payload is unserialized in |unserialized_data|. | 60 UNSERIALIZED = 1, // The payload is unserialized in |unserialized_data|. |
61 BLOB = 2, // The payload is a blob. | 61 BLOB = 2, // The payload is a blob. |
62 FILESYSTEM = 3, // The payload is WebFileSystem. | 62 FILESYSTEM = 3, // The payload is WebFileSystem. |
63 }; | 63 }; |
64 // Which data payload to use when delivering the intent. | 64 // Which data payload to use when delivering the intent. |
65 DataType data_type; | 65 DataType data_type; |
66 | 66 |
67 WebIntentData(); | 67 WebIntentData(); |
68 | 68 |
69 // NOTE! Constructors do not initialize message_port_ids. Caller must do this. | 69 // NOTE! Constructors do not initialize message_port_ids. Caller must do this. |
70 | 70 |
71 WebIntentData(const WebKit::WebIntent& intent); | 71 WebIntentData(const WebKit::WebIntent& intent); |
72 WebIntentData(const string16& action_in, | 72 WebIntentData(const string16& action_in, |
73 const string16& type_in, | 73 const string16& type_in, |
74 const string16& unserialized_data_in); | 74 const string16& unserialized_data_in); |
75 WebIntentData(const string16& action_in, | 75 WebIntentData(const string16& action_in, |
76 const string16& type_in, | 76 const string16& type_in, |
77 const FilePath& blob_file_in, | 77 const FilePath& blob_file_in, |
78 int64 blob_length_in); | 78 int64 blob_length_in); |
79 WebIntentData(const string16& action_in, | 79 WebIntentData(const string16& action_in, |
80 const string16& type_in, | 80 const string16& type_in, |
81 const FilePath& root_path_in, | 81 const std::string& root_name_in, |
82 const std::string& filesystem_id_in); | 82 const std::string& filesystem_id_in); |
83 ~WebIntentData(); | 83 ~WebIntentData(); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace webkit_glue | 86 } // namespace webkit_glue |
87 | 87 |
88 #endif // WEBKIT_GLUE_WEB_INTENT_DATA_H_ | 88 #endif // WEBKIT_GLUE_WEB_INTENT_DATA_H_ |
OLD | NEW |