| 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 file, no traditional include guard. | 5 // Multiply-included file, no traditional include guard. |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 38 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
| 39 #include "third_party/skia/include/core/SkBitmap.h" | 39 #include "third_party/skia/include/core/SkBitmap.h" |
| 40 #include "ui/base/window_open_disposition.h" | 40 #include "ui/base/window_open_disposition.h" |
| 41 #include "ui/gfx/geometry/rect.h" | 41 #include "ui/gfx/geometry/rect.h" |
| 42 #include "ui/gfx/ipc/gfx_param_traits.h" | 42 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 43 | 43 |
| 44 // Singly-included section for enums and custom IPC traits. | 44 // Singly-included section for enums and custom IPC traits. |
| 45 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ | 45 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 46 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 46 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 47 | 47 |
| 48 // This enum is inside a struct so that we can forward-declare the struct in | 48 enum class ChromeViewHostMsg_GetPluginInfo_Status { |
| 49 // others headers without having to include this one. | 49 kAllowed, |
| 50 struct ChromeViewHostMsg_GetPluginInfo_Status { | 50 kBlocked, |
| 51 enum Value { | 51 kBlockedByPolicy, |
| 52 kAllowed, | 52 kDisabled, |
| 53 kBlocked, | 53 kNotFound, |
| 54 kBlockedByPolicy, | 54 kNPAPINotSupported, |
| 55 kDisabled, | 55 kOutdatedBlocked, |
| 56 kNotFound, | 56 kOutdatedDisallowed, |
| 57 kNPAPINotSupported, | 57 kPlayImportantContent, |
| 58 kOutdatedBlocked, | 58 kUnauthorized, |
| 59 kOutdatedDisallowed, | |
| 60 kPlayImportantContent, | |
| 61 kUnauthorized, | |
| 62 }; | |
| 63 | |
| 64 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {} | |
| 65 | |
| 66 Value value; | |
| 67 }; | 59 }; |
| 68 | 60 |
| 69 namespace IPC { | 61 namespace IPC { |
| 70 | 62 |
| 71 template <> | 63 template <> |
| 72 struct ParamTraits<ContentSettingsPattern> { | 64 struct ParamTraits<ContentSettingsPattern> { |
| 73 typedef ContentSettingsPattern param_type; | 65 typedef ContentSettingsPattern param_type; |
| 74 static void Write(Message* m, const param_type& p); | 66 static void Write(Message* m, const param_type& p); |
| 75 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 67 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 76 static void Log(const param_type& p, std::string* l); | 68 static void Log(const param_type& p, std::string* l); |
| 77 }; | 69 }; |
| 78 | 70 |
| 79 } // namespace IPC | 71 } // namespace IPC |
| 80 | 72 |
| 81 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 73 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| 82 | 74 |
| 83 #define IPC_MESSAGE_START ChromeMsgStart | 75 #define IPC_MESSAGE_START ChromeMsgStart |
| 84 | 76 |
| 85 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status::Value, | 77 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status, |
| 86 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized) | 78 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized) |
| 87 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusChangeReason, | 79 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusChangeReason, |
| 88 OMNIBOX_FOCUS_CHANGE_REASON_LAST) | 80 OMNIBOX_FOCUS_CHANGE_REASON_LAST) |
| 89 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusState, OMNIBOX_FOCUS_STATE_LAST) | 81 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusState, OMNIBOX_FOCUS_STATE_LAST) |
| 90 IPC_ENUM_TRAITS_MAX_VALUE(search_provider::OSDDType, | 82 IPC_ENUM_TRAITS_MAX_VALUE(search_provider::OSDDType, |
| 91 search_provider::OSDD_TYPE_LAST) | 83 search_provider::OSDD_TYPE_LAST) |
| 92 IPC_ENUM_TRAITS(search_provider::InstallState) | 84 IPC_ENUM_TRAITS(search_provider::InstallState) |
| 93 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment) | 85 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment) |
| 94 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling) | 86 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling) |
| 95 IPC_ENUM_TRAITS(blink::WebConsoleMessage::Level) | 87 IPC_ENUM_TRAITS(blink::WebConsoleMessage::Level) |
| 96 IPC_ENUM_TRAITS(content::TopControlsState) | 88 IPC_ENUM_TRAITS(content::TopControlsState) |
| 97 | 89 |
| 98 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status) | |
| 99 IPC_STRUCT_TRAITS_MEMBER(value) | |
| 100 IPC_STRUCT_TRAITS_END() | |
| 101 | |
| 102 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. | 90 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. |
| 103 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) | 91 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) |
| 104 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) | 92 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) |
| 105 IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin) | 93 IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin) |
| 106 IPC_STRUCT_MEMBER(std::string, actual_mime_type) | 94 IPC_STRUCT_MEMBER(std::string, actual_mime_type) |
| 107 IPC_STRUCT_MEMBER(std::string, group_identifier) | 95 IPC_STRUCT_MEMBER(std::string, group_identifier) |
| 108 IPC_STRUCT_MEMBER(base::string16, group_name) | 96 IPC_STRUCT_MEMBER(base::string16, group_name) |
| 109 IPC_STRUCT_END() | 97 IPC_STRUCT_END() |
| 110 | 98 |
| 111 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts) | 99 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts) |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 | 660 |
| 673 // Tells the browser process whether the web page wants the banner to be shown. | 661 // Tells the browser process whether the web page wants the banner to be shown. |
| 674 // This is a reply from ChromeViewMsg_AppBannerPromptRequest. | 662 // This is a reply from ChromeViewMsg_AppBannerPromptRequest. |
| 675 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_AppBannerPromptReply, | 663 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_AppBannerPromptReply, |
| 676 int /* request_id */, | 664 int /* request_id */, |
| 677 blink::WebAppBannerPromptReply /* reply */) | 665 blink::WebAppBannerPromptReply /* reply */) |
| 678 | 666 |
| 679 // Sent by the renderer to indicate that a fields trial has been activated. | 667 // Sent by the renderer to indicate that a fields trial has been activated. |
| 680 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_FieldTrialActivated, | 668 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_FieldTrialActivated, |
| 681 std::string /* name */) | 669 std::string /* name */) |
| OLD | NEW |