Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 file, no traditional include guard. | 5 // Multiply-included file, no traditional include guard. |
| 6 #include <map> | 6 #include <map> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 // TODO(erg): This list has been temporarily annotated by erg while doing work | 11 // TODO(erg): This list has been temporarily annotated by erg while doing work |
| 12 // on which headers to pull out. | 12 // on which headers to pull out. |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "base/process.h" | 15 #include "base/process.h" |
| 16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
| 17 #include "base/string16.h" | 17 #include "base/string16.h" |
| 18 #include "base/stringprintf.h" | 18 #include "base/stringprintf.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 21 #include "chrome/common/common_param_traits.h" | 21 #include "chrome/common/common_param_traits.h" |
| 22 #include "chrome/common/content_settings.h" | |
| 23 #include "chrome/common/content_settings_pattern.h" | |
| 22 #include "chrome/common/instant_types.h" | 24 #include "chrome/common/instant_types.h" |
| 23 #include "chrome/common/nacl_types.h" | 25 #include "chrome/common/nacl_types.h" |
| 24 #include "chrome/common/search_provider.h" | 26 #include "chrome/common/search_provider.h" |
| 25 #include "chrome/common/thumbnail_score.h" | 27 #include "chrome/common/thumbnail_score.h" |
| 26 #include "chrome/common/translate_errors.h" | 28 #include "chrome/common/translate_errors.h" |
| 27 #include "content/common/common_param_traits.h" | 29 #include "content/common/common_param_traits.h" |
| 28 #include "content/common/webkit_param_traits.h" | 30 #include "content/common/webkit_param_traits.h" |
| 29 #include "ipc/ipc_message_macros.h" | 31 #include "ipc/ipc_message_macros.h" |
| 30 #include "ipc/ipc_platform_file.h" | 32 #include "ipc/ipc_platform_file.h" |
| 31 #include "third_party/skia/include/core/SkBitmap.h" | 33 #include "third_party/skia/include/core/SkBitmap.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 #endif // defined(OS_POSIX) && !defined(USE_AURA) | 97 #endif // defined(OS_POSIX) && !defined(USE_AURA) |
| 96 | 98 |
| 97 template <> | 99 template <> |
| 98 struct ParamTraits<ContentSettings> { | 100 struct ParamTraits<ContentSettings> { |
| 99 typedef ContentSettings param_type; | 101 typedef ContentSettings param_type; |
| 100 static void Write(Message* m, const param_type& p); | 102 static void Write(Message* m, const param_type& p); |
| 101 static bool Read(const Message* m, void** iter, param_type* r); | 103 static bool Read(const Message* m, void** iter, param_type* r); |
| 102 static void Log(const param_type& p, std::string* l); | 104 static void Log(const param_type& p, std::string* l); |
| 103 }; | 105 }; |
| 104 | 106 |
| 107 template <> | |
| 108 struct ParamTraits<ContentSettingsPattern> { | |
|
Bernhard Bauer
2011/10/17 13:13:19
I think you could do this via the |IPC_STRUCT_TRAI
marja
2011/10/18 12:23:02
Done. But, I had to make ContentSettingsPattern::P
Bernhard Bauer
2011/10/18 13:14:31
Making ContentSettingsPattern::PatternParts itself
marja
2011/10/19 16:56:35
(This got resolved by your CL.)
| |
| 109 typedef ContentSettingsPattern param_type; | |
| 110 static void Write(Message* m, const param_type& p); | |
| 111 static bool Read(const Message* m, void** iter, param_type* r); | |
| 112 static void Log(const param_type& p, std::string* l); | |
| 113 }; | |
| 114 | |
| 105 } // namespace IPC | 115 } // namespace IPC |
| 106 | 116 |
| 107 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 117 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| 108 | 118 |
| 109 #define IPC_MESSAGE_START ChromeMsgStart | 119 #define IPC_MESSAGE_START ChromeMsgStart |
| 110 | 120 |
| 111 IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value) | 121 IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value) |
| 112 IPC_ENUM_TRAITS(InstantCompleteBehavior) | 122 IPC_ENUM_TRAITS(InstantCompleteBehavior) |
| 113 IPC_ENUM_TRAITS(search_provider::OSDDType) | 123 IPC_ENUM_TRAITS(search_provider::OSDDType) |
| 114 IPC_ENUM_TRAITS(search_provider::InstallState) | 124 IPC_ENUM_TRAITS(search_provider::InstallState) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetContentSettingsForCurrentURL, | 219 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetContentSettingsForCurrentURL, |
| 210 GURL /* url */, | 220 GURL /* url */, |
| 211 ContentSettings /* content_settings */) | 221 ContentSettings /* content_settings */) |
| 212 | 222 |
| 213 // Set the content settings for a particular url that the renderer is in the | 223 // Set the content settings for a particular url that the renderer is in the |
| 214 // process of loading. This will be stored, to be used if the load commits | 224 // process of loading. This will be stored, to be used if the load commits |
| 215 // and ignored otherwise. | 225 // and ignored otherwise. |
| 216 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetDefaultContentSettings, | 226 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetDefaultContentSettings, |
| 217 ContentSettings /* content_settings */) | 227 ContentSettings /* content_settings */) |
| 218 | 228 |
| 229 // Set the content settings for images. | |
| 230 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetImageSettingRules, | |
| 231 ContentSettingsForOneType /* rules */) | |
| 232 | |
| 219 // Tells the render view to load all blocked plugins. | 233 // Tells the render view to load all blocked plugins. |
| 220 IPC_MESSAGE_ROUTED0(ChromeViewMsg_LoadBlockedPlugins) | 234 IPC_MESSAGE_ROUTED0(ChromeViewMsg_LoadBlockedPlugins) |
| 221 | 235 |
| 222 // Asks the renderer to send back stats on the WebCore cache broken down by | 236 // Asks the renderer to send back stats on the WebCore cache broken down by |
| 223 // resource types. | 237 // resource types. |
| 224 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats) | 238 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats) |
| 225 | 239 |
| 226 // Asks the renderer to send back Histograms. | 240 // Asks the renderer to send back Histograms. |
| 227 IPC_MESSAGE_CONTROL1(ChromeViewMsg_GetRendererHistograms, | 241 IPC_MESSAGE_CONTROL1(ChromeViewMsg_GetRendererHistograms, |
| 228 int /* sequence number of Renderer Histograms. */) | 242 int /* sequence number of Renderer Histograms. */) |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 596 // previous SetCookie message to be processed. | 610 // previous SetCookie message to be processed. |
| 597 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, | 611 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, |
| 598 GURL /* url */, | 612 GURL /* url */, |
| 599 GURL /* first_party_for_cookies */, | 613 GURL /* first_party_for_cookies */, |
| 600 std::string /* cookies */) | 614 std::string /* cookies */) |
| 601 | 615 |
| 602 // Provide the browser process with current renderer framerate. | 616 // Provide the browser process with current renderer framerate. |
| 603 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, | 617 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, |
| 604 int /* routing id */, | 618 int /* routing id */, |
| 605 float /* frames per second */) | 619 float /* frames per second */) |
| OLD | NEW |