OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WEBKIT_GLUE_WEB_INTENT_REPLY_DATA_H_ | |
6 #define WEBKIT_GLUE_WEB_INTENT_REPLY_DATA_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "base/string16.h" | |
10 #include "webkit/glue/webkit_glue_export.h" | |
11 | |
12 namespace webkit_glue { | |
13 | |
14 // Constant values use to indicate what type of reply the caller is getting from | |
15 // the web intents service page. | |
16 enum WebIntentReplyType { | |
17 // Invalid type. Use to initialize reply types. | |
18 WEB_INTENT_REPLY_INVALID, | |
19 | |
20 // Sent for a reply message (success). | |
21 WEB_INTENT_REPLY_SUCCESS, | |
22 | |
23 // Sent for a failure message. | |
24 WEB_INTENT_REPLY_FAILURE, | |
25 | |
26 // Sent if the picker is cancelled without a selection being made. | |
27 WEB_INTENT_PICKER_CANCELLED, | |
28 | |
29 // Sent if the service contents is closed without any response being sent. | |
30 WEB_INTENT_SERVICE_CONTENTS_CLOSED, | |
31 }; | |
32 | |
33 struct WEBKIT_GLUE_EXPORT WebIntentReply { | |
34 WebIntentReply(); | |
35 WebIntentReply(WebIntentReplyType type, string16 data); | |
36 WebIntentReply( | |
37 WebIntentReplyType type, | |
38 base::FilePath data_file, | |
39 int64 data_file_size); | |
40 | |
41 bool operator==(const WebIntentReply& other) const; | |
42 | |
43 // Response type. Default value is WEB_INTENT_REPLY_INVALID. | |
44 WebIntentReplyType type; | |
45 | |
46 // Serialized data. Default value is empty. | |
47 string16 data; | |
48 | |
49 // FilePath to the data to be delivered. Default value is empty. | |
50 base::FilePath data_file; | |
51 | |
52 // Length of data_path. | |
53 int64 data_file_size; | |
54 }; | |
55 | |
56 } // namespace webkit_glue | |
57 | |
58 #endif // WEBKIT_GLUE_WEB_INTENT_REPLY_DATA_H_ | |
OLD | NEW |