| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 // The origin doing the initiating. | 832 // The origin doing the initiating. |
| 833 GURL origin_url; | 833 GURL origin_url; |
| 834 | 834 |
| 835 // The requested FileSystem type. | 835 // The requested FileSystem type. |
| 836 WebKit::WebFileSystem::Type type; | 836 WebKit::WebFileSystem::Type type; |
| 837 | 837 |
| 838 // Indicates how much storage space (in bytes) the caller expects to need. | 838 // Indicates how much storage space (in bytes) the caller expects to need. |
| 839 int64 requested_size; | 839 int64 requested_size; |
| 840 }; | 840 }; |
| 841 | 841 |
| 842 struct ViewMsg_FileSystem_DidReadDirectory_Params { |
| 843 // The response should have this id. |
| 844 int request_id; |
| 845 |
| 846 // TODO(kinuko): replace this with file_util_proxy's entry structure |
| 847 // once it's defined. |
| 848 struct Entry { |
| 849 // Name of the entry. |
| 850 FilePath name; |
| 851 |
| 852 // Indicates if the entry is directory or not. |
| 853 bool is_directory; |
| 854 }; |
| 855 |
| 856 // A vector of directory entries. |
| 857 std::vector<Entry> entries; |
| 858 |
| 859 // Indicates if there will be more entries. |
| 860 bool has_more; |
| 861 }; |
| 862 |
| 842 namespace IPC { | 863 namespace IPC { |
| 843 | 864 |
| 844 class Message; | 865 class Message; |
| 845 | 866 |
| 846 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. | 867 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. |
| 847 template <> | 868 template <> |
| 848 struct ParamTraits<ViewMsg_Navigate_Params> { | 869 struct ParamTraits<ViewMsg_Navigate_Params> { |
| 849 typedef ViewMsg_Navigate_Params param_type; | 870 typedef ViewMsg_Navigate_Params param_type; |
| 850 static void Write(Message* m, const param_type& p); | 871 static void Write(Message* m, const param_type& p); |
| 851 static bool Read(const Message* m, void** iter, param_type* p); | 872 static bool Read(const Message* m, void** iter, param_type* p); |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 }; | 1106 }; |
| 1086 | 1107 |
| 1087 template <> | 1108 template <> |
| 1088 struct ParamTraits<ViewHostMsg_OpenFileSystemRequest_Params> { | 1109 struct ParamTraits<ViewHostMsg_OpenFileSystemRequest_Params> { |
| 1089 typedef ViewHostMsg_OpenFileSystemRequest_Params param_type; | 1110 typedef ViewHostMsg_OpenFileSystemRequest_Params param_type; |
| 1090 static void Write(Message* m, const param_type& p); | 1111 static void Write(Message* m, const param_type& p); |
| 1091 static bool Read(const Message* m, void** iter, param_type* p); | 1112 static bool Read(const Message* m, void** iter, param_type* p); |
| 1092 static void Log(const param_type& p, std::string* l); | 1113 static void Log(const param_type& p, std::string* l); |
| 1093 }; | 1114 }; |
| 1094 | 1115 |
| 1116 template <> |
| 1117 struct ParamTraits<ViewMsg_FileSystem_DidReadDirectory_Params> { |
| 1118 typedef ViewMsg_FileSystem_DidReadDirectory_Params param_type; |
| 1119 static void Write(Message* m, const param_type& p); |
| 1120 static bool Read(const Message* m, void** iter, param_type* p); |
| 1121 static void Log(const param_type& p, std::string* l); |
| 1122 }; |
| 1123 |
| 1124 template <> |
| 1125 struct ParamTraits<ViewMsg_FileSystem_DidReadDirectory_Params::Entry> { |
| 1126 typedef ViewMsg_FileSystem_DidReadDirectory_Params::Entry param_type; |
| 1127 static void Write(Message* m, const param_type& p); |
| 1128 static bool Read(const Message* m, void** iter, param_type* p); |
| 1129 static void Log(const param_type& p, std::string* l); |
| 1130 }; |
| 1131 |
| 1095 } // namespace IPC | 1132 } // namespace IPC |
| 1096 | 1133 |
| 1097 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 1134 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| OLD | NEW |