OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include <map> | 10 #include <map> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/clipboard.h" | 13 #include "base/clipboard.h" |
14 #include "base/gfx/native_widget_types.h" | 14 #include "base/gfx/native_widget_types.h" |
15 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
17 #include "chrome/browser/renderer_host/resource_handler.h" | 17 #include "chrome/browser/renderer_host/resource_handler.h" |
18 #include "chrome/common/common_param_traits.h" | 18 #include "chrome/common/common_param_traits.h" |
19 #include "chrome/common/css_colors.h" | 19 #include "chrome/common/css_colors.h" |
| 20 #include "chrome/common/edit_command.h" |
20 #include "chrome/common/extensions/update_manifest.h" | 21 #include "chrome/common/extensions/update_manifest.h" |
21 #include "chrome/common/extensions/url_pattern.h" | 22 #include "chrome/common/extensions/url_pattern.h" |
22 #include "chrome/common/filter_policy.h" | 23 #include "chrome/common/filter_policy.h" |
23 #include "chrome/common/modal_dialog_event.h" | 24 #include "chrome/common/modal_dialog_event.h" |
24 #include "chrome/common/page_transition_types.h" | 25 #include "chrome/common/page_transition_types.h" |
25 #include "chrome/common/renderer_preferences.h" | 26 #include "chrome/common/renderer_preferences.h" |
26 #include "chrome/common/transport_dib.h" | 27 #include "chrome/common/transport_dib.h" |
27 #include "chrome/common/view_types.h" | 28 #include "chrome/common/view_types.h" |
28 #include "chrome/common/webkit_param_traits.h" | 29 #include "chrome/common/webkit_param_traits.h" |
29 #include "googleurl/src/gurl.h" | 30 #include "googleurl/src/gurl.h" |
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2213 #endif | 2214 #endif |
2214 default: | 2215 default: |
2215 type = L"UNKNOWN"; | 2216 type = L"UNKNOWN"; |
2216 break; | 2217 break; |
2217 } | 2218 } |
2218 | 2219 |
2219 LogParam(type, l); | 2220 LogParam(type, l); |
2220 } | 2221 } |
2221 }; | 2222 }; |
2222 | 2223 |
| 2224 // Traits for EditCommand structure. |
| 2225 template <> |
| 2226 struct ParamTraits<EditCommand> { |
| 2227 typedef EditCommand param_type; |
| 2228 static void Write(Message* m, const param_type& p) { |
| 2229 WriteParam(m, p.name); |
| 2230 WriteParam(m, p.value); |
| 2231 } |
| 2232 static bool Read(const Message* m, void** iter, param_type* p) { |
| 2233 return ReadParam(m, iter, &p->name) && ReadParam(m, iter, &p->value); |
| 2234 } |
| 2235 static void Log(const param_type& p, std::wstring* l) { |
| 2236 l->append(L"("); |
| 2237 LogParam(p.name, l); |
| 2238 l->append(L":"); |
| 2239 LogParam(p.value, l); |
| 2240 l->append(L")"); |
| 2241 } |
| 2242 }; |
| 2243 |
2223 } // namespace IPC | 2244 } // namespace IPC |
2224 | 2245 |
2225 | 2246 |
2226 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2247 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2227 #include "ipc/ipc_message_macros.h" | 2248 #include "ipc/ipc_message_macros.h" |
2228 | 2249 |
2229 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2250 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |