OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "app/clipboard/clipboard.h" | 12 #include "app/clipboard/clipboard.h" |
13 #include "app/gfx/native_widget_types.h" | 13 #include "app/gfx/native_widget_types.h" |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
16 #include "base/ref_counted.h" | 16 #include "base/ref_counted.h" |
17 #include "base/shared_memory.h" | 17 #include "base/shared_memory.h" |
18 #include "base/string16.h" | 18 #include "base/string16.h" |
19 #include "chrome/browser/renderer_host/resource_handler.h" | 19 #include "chrome/browser/renderer_host/resource_handler.h" |
20 #include "chrome/common/common_param_traits.h" | 20 #include "chrome/common/common_param_traits.h" |
21 #include "chrome/common/css_colors.h" | 21 #include "chrome/common/css_colors.h" |
22 #include "chrome/common/dom_storage_type.h" | 22 #include "chrome/common/dom_storage_type.h" |
23 #include "chrome/common/edit_command.h" | 23 #include "chrome/common/edit_command.h" |
24 #include "chrome/common/extensions/update_manifest.h" | |
25 #include "chrome/common/extensions/url_pattern.h" | 24 #include "chrome/common/extensions/url_pattern.h" |
26 #include "chrome/common/filter_policy.h" | 25 #include "chrome/common/filter_policy.h" |
27 #include "chrome/common/navigation_gesture.h" | 26 #include "chrome/common/navigation_gesture.h" |
28 #include "chrome/common/page_transition_types.h" | 27 #include "chrome/common/page_transition_types.h" |
29 #include "chrome/common/renderer_preferences.h" | 28 #include "chrome/common/renderer_preferences.h" |
30 #include "chrome/common/transport_dib.h" | 29 #include "chrome/common/transport_dib.h" |
31 #include "chrome/common/view_types.h" | 30 #include "chrome/common/view_types.h" |
32 #include "chrome/common/webkit_param_traits.h" | 31 #include "chrome/common/webkit_param_traits.h" |
33 #include "googleurl/src/gurl.h" | 32 #include "googleurl/src/gurl.h" |
34 #include "ipc/ipc_message_utils.h" | 33 #include "ipc/ipc_message_utils.h" |
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2082 LogParam(p.has_selection, l); | 2081 LogParam(p.has_selection, l); |
2083 l->append(L")"); | 2082 l->append(L")"); |
2084 } | 2083 } |
2085 }; | 2084 }; |
2086 | 2085 |
2087 template <> | 2086 template <> |
2088 struct SimilarTypeTraits<ViewType::Type> { | 2087 struct SimilarTypeTraits<ViewType::Type> { |
2089 typedef int Type; | 2088 typedef int Type; |
2090 }; | 2089 }; |
2091 | 2090 |
2092 // Traits for UpdateManifest::Result. | |
2093 template <> | |
2094 struct ParamTraits<UpdateManifest::Result> { | |
2095 typedef UpdateManifest::Result param_type; | |
2096 static void Write(Message* m, const param_type& p) { | |
2097 WriteParam(m, p.extension_id); | |
2098 WriteParam(m, p.version); | |
2099 WriteParam(m, p.browser_min_version); | |
2100 WriteParam(m, p.package_hash); | |
2101 WriteParam(m, p.crx_url); | |
2102 } | |
2103 static bool Read(const Message* m, void** iter, param_type* p) { | |
2104 return ReadParam(m, iter, &p->extension_id) && | |
2105 ReadParam(m, iter, &p->version) && | |
2106 ReadParam(m, iter, &p->browser_min_version) && | |
2107 ReadParam(m, iter, &p->package_hash) && | |
2108 ReadParam(m, iter, &p->crx_url); | |
2109 } | |
2110 static void Log(const param_type& p, std::wstring* l) { | |
2111 l->append(L"("); | |
2112 LogParam(p.extension_id, l); | |
2113 l->append(L", "); | |
2114 LogParam(p.version, l); | |
2115 l->append(L", "); | |
2116 LogParam(p.browser_min_version, l); | |
2117 l->append(L", "); | |
2118 LogParam(p.package_hash, l); | |
2119 l->append(L", "); | |
2120 LogParam(p.crx_url, l); | |
2121 l->append(L")"); | |
2122 } | |
2123 }; | |
2124 | |
2125 // Traits for URLPattern. | 2091 // Traits for URLPattern. |
2126 template <> | 2092 template <> |
2127 struct ParamTraits<URLPattern> { | 2093 struct ParamTraits<URLPattern> { |
2128 typedef URLPattern param_type; | 2094 typedef URLPattern param_type; |
2129 static void Write(Message* m, const param_type& p) { | 2095 static void Write(Message* m, const param_type& p) { |
2130 WriteParam(m, p.GetAsString()); | 2096 WriteParam(m, p.GetAsString()); |
2131 } | 2097 } |
2132 static bool Read(const Message* m, void** iter, param_type* p) { | 2098 static bool Read(const Message* m, void** iter, param_type* p) { |
2133 std::string spec; | 2099 std::string spec; |
2134 if (!ReadParam(m, iter, &spec)) | 2100 if (!ReadParam(m, iter, &spec)) |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2294 } | 2260 } |
2295 }; | 2261 }; |
2296 | 2262 |
2297 } // namespace IPC | 2263 } // namespace IPC |
2298 | 2264 |
2299 | 2265 |
2300 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2266 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2301 #include "ipc/ipc_message_macros.h" | 2267 #include "ipc/ipc_message_macros.h" |
2302 | 2268 |
2303 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2269 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |