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 // Multiply-included message file, no traditional include guard. | 5 // Multiply-included message file, no traditional include guard. |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "chrome/common/automation_constants.h" | 11 #include "chrome/common/automation_constants.h" |
12 #include "chrome/common/automation_events.h" | 12 #include "chrome/common/automation_events.h" |
13 #include "chrome/common/common_param_traits.h" | 13 #include "chrome/common/common_param_traits.h" |
14 #include "chrome/common/content_settings.h" | 14 #include "chrome/common/content_settings.h" |
15 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
16 #include "content/public/common/page_type.h" | 16 #include "content/public/common/page_type.h" |
17 #include "content/public/common/security_style.h" | 17 #include "content/public/common/security_style.h" |
18 #include "content/public/common/webkit_param_traits.h" | |
19 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
20 #include "ipc/ipc_message_macros.h" | 19 #include "ipc/ipc_message_macros.h" |
21 #include "ipc/ipc_message_utils.h" | 20 #include "ipc/ipc_message_utils.h" |
22 #include "net/base/cert_status_flags.h" | 21 #include "net/base/cert_status_flags.h" |
23 #include "net/base/host_port_pair.h" | 22 #include "net/base/host_port_pair.h" |
24 #include "net/base/upload_data.h" | 23 #include "net/base/upload_data.h" |
25 #include "net/url_request/url_request_status.h" | 24 #include "net/url_request/url_request_status.h" |
26 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
27 #include "webkit/glue/window_open_disposition.h" | 26 #include "webkit/glue/window_open_disposition.h" |
28 | 27 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // ui::MenuModel::TYPE_SUBMENU. | 186 // ui::MenuModel::TYPE_SUBMENU. |
188 ContextMenuModel* submenu; | 187 ContextMenuModel* submenu; |
189 }; | 188 }; |
190 | 189 |
191 // This is the list of menu items. | 190 // This is the list of menu items. |
192 std::vector<Item> items; | 191 std::vector<Item> items; |
193 }; | 192 }; |
194 | 193 |
195 namespace IPC { | 194 namespace IPC { |
196 | 195 |
197 // Traits for ContextMenuModel structure to pack/unpack. | 196 template <> |
| 197 struct ParamTraits<AutomationMouseEvent> { |
| 198 typedef AutomationMouseEvent param_type; |
| 199 static void Write(Message* m, const param_type& p); |
| 200 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 201 static void Log(const param_type& p, std::string* l); |
| 202 }; |
| 203 |
198 template <> | 204 template <> |
199 struct ParamTraits<ContextMenuModel> { | 205 struct ParamTraits<ContextMenuModel> { |
200 typedef ContextMenuModel param_type; | 206 typedef ContextMenuModel param_type; |
201 static void Write(Message* m, const param_type& p); | 207 static void Write(Message* m, const param_type& p); |
202 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 208 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
203 static void Log(const param_type& p, std::string* l); | 209 static void Log(const param_type& p, std::string* l); |
204 }; | 210 }; |
205 | 211 |
206 // Traits for AutomationMouseEvent structure to pack/unpack. | |
207 template <> | 212 template <> |
208 struct ParamTraits<AutomationMouseEvent> { | 213 struct ParamTraits<scoped_refptr<net::UploadData> > { |
209 typedef AutomationMouseEvent param_type; | 214 typedef scoped_refptr<net::UploadData> param_type; |
210 static void Write(Message* m, const param_type& p); | 215 static void Write(Message* m, const param_type& p); |
211 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 216 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 217 static void Log(const param_type& p, std::string* l); |
| 218 }; |
| 219 |
| 220 template <> |
| 221 struct ParamTraits<net::URLRequestStatus> { |
| 222 typedef net::URLRequestStatus param_type; |
| 223 static void Write(Message* m, const param_type& p); |
| 224 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
212 static void Log(const param_type& p, std::string* l); | 225 static void Log(const param_type& p, std::string* l); |
213 }; | 226 }; |
214 | 227 |
215 } // namespace IPC | 228 } // namespace IPC |
216 | 229 |
217 #endif // CHROME_COMMON_AUTOMATION_MESSAGES_H_ | 230 #endif // CHROME_COMMON_AUTOMATION_MESSAGES_H_ |
218 | 231 |
219 // Keep this internal message file unchanged to preserve line numbering | 232 // Keep this internal message file unchanged to preserve line numbering |
220 // (and hence the dubious __LINE__-based message numberings) across versions. | 233 // (and hence the dubious __LINE__-based message numberings) across versions. |
221 #include "chrome/common/automation_messages_internal.h" | 234 #include "chrome/common/automation_messages_internal.h" |
OLD | NEW |