| // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Singly or Multiply-included shared traits file depending on circumstances. |
| // This allows the use of IPC serialization macros in more than one IPC message |
| // file. |
| #ifndef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_ |
| #define CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_ |
| |
| #include "build/build_config.h" |
| #include "content/public/common/drop_data.h" |
| #include "content/public/common/referrer.h" |
| #include "content/public/common/webplugininfo_param_traits.h" |
| #include "ipc/ipc_message_macros.h" |
| #include "services/network/public/cpp/network_ipc_param_traits.h" |
| #include "services/network/public/mojom/referrer_policy.mojom.h" |
| #include "third_party/blink/public/common/page/drag_operation.h" |
| #include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h" |
| #include "third_party/blink/public/common/security/security_style.h" |
| #include "third_party/blink/public/common/web_preferences/web_preferences.h" |
| #include "third_party/blink/public/mojom/devtools/console_message.mojom.h" |
| #include "third_party/blink/public/mojom/page_state/page_state.mojom.h" |
| #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h" |
| #include "third_party/blink/public/mojom/v8_cache_options.mojom.h" |
| #include "third_party/blink/public/mojom/window_features/window_features.mojom.h" |
| #include "third_party/blink/public/platform/web_rect.h" |
| #include "third_party/blink/public/platform/web_url_request.h" |
| #include "ui/accessibility/ax_param_traits.h" |
| #include "ui/base/page_transition_types.h" |
| #include "ui/base/window_open_disposition.h" |
| #include "ui/gfx/ipc/geometry/gfx_param_traits.h" |
| #include "ui/gfx/ipc/gfx_param_traits.h" |
| #include "ui/gfx/transform.h" |
| |
| #undef IPC_MESSAGE_EXPORT |
| #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| |
| IPC_ENUM_TRAITS_VALIDATE(ui::PageTransition, |
| ((value & |
| ui::PageTransition::PAGE_TRANSITION_CORE_MASK) <= |
| ui::PageTransition::PAGE_TRANSITION_LAST_CORE)) |
| IPC_ENUM_TRAITS_MAX_VALUE(blink::mojom::ConsoleMessageLevel, |
| blink::mojom::ConsoleMessageLevel::kError) |
| IPC_ENUM_TRAITS_MAX_VALUE(network::mojom::ReferrerPolicy, |
| network::mojom::ReferrerPolicy::kMaxValue) |
| IPC_ENUM_TRAITS_MAX_VALUE(blink::mojom::ScrollRestorationType, |
| blink::mojom::ScrollRestorationType::kMaxValue) |
| IPC_ENUM_TRAITS_MAX_VALUE(blink::SecurityStyle, blink::SecurityStyle::kMaxValue) |
| IPC_ENUM_TRAITS_MAX_VALUE(blink::mojom::PermissionStatus, |
| blink::mojom::PermissionStatus::LAST) |
| IPC_ENUM_TRAITS_MAX_VALUE(WindowOpenDisposition, |
| WindowOpenDisposition::MAX_VALUE) |
| |
| IPC_STRUCT_TRAITS_BEGIN(blink::WebRect) |
| IPC_STRUCT_TRAITS_MEMBER(x) |
| IPC_STRUCT_TRAITS_MEMBER(y) |
| IPC_STRUCT_TRAITS_MEMBER(width) |
| IPC_STRUCT_TRAITS_MEMBER(height) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(content::Referrer) |
| IPC_STRUCT_TRAITS_MEMBER(url) |
| IPC_STRUCT_TRAITS_MEMBER(policy) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(blink::mojom::WindowFeatures) |
| IPC_STRUCT_TRAITS_MEMBER(x) |
| IPC_STRUCT_TRAITS_MEMBER(has_x) |
| IPC_STRUCT_TRAITS_MEMBER(y) |
| IPC_STRUCT_TRAITS_MEMBER(has_y) |
| IPC_STRUCT_TRAITS_MEMBER(width) |
| IPC_STRUCT_TRAITS_MEMBER(has_width) |
| IPC_STRUCT_TRAITS_MEMBER(height) |
| IPC_STRUCT_TRAITS_MEMBER(has_height) |
| IPC_STRUCT_TRAITS_MEMBER(menu_bar_visible) |
| IPC_STRUCT_TRAITS_MEMBER(status_bar_visible) |
| IPC_STRUCT_TRAITS_MEMBER(tool_bar_visible) |
| IPC_STRUCT_TRAITS_MEMBER(scrollbars_visible) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting, |
| gfx::FontRenderParams::HINTING_MAX) |
| IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering, |
| gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX) |
| |
| IPC_STRUCT_TRAITS_BEGIN(blink::UserAgentBrandVersion) |
| IPC_STRUCT_TRAITS_MEMBER(brand) |
| IPC_STRUCT_TRAITS_MEMBER(major_version) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(blink::UserAgentMetadata) |
| IPC_STRUCT_TRAITS_MEMBER(brand_version_list) |
| IPC_STRUCT_TRAITS_MEMBER(full_version) |
| IPC_STRUCT_TRAITS_MEMBER(platform) |
| IPC_STRUCT_TRAITS_MEMBER(platform_version) |
| IPC_STRUCT_TRAITS_MEMBER(architecture) |
| IPC_STRUCT_TRAITS_MEMBER(model) |
| IPC_STRUCT_TRAITS_MEMBER(mobile) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(blink::UserAgentOverride) |
| IPC_STRUCT_TRAITS_MEMBER(ua_string_override) |
| IPC_STRUCT_TRAITS_MEMBER(ua_metadata_override) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(blink::RendererPreferences) |
| IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) |
| IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) |
| IPC_STRUCT_TRAITS_MEMBER(hinting) |
| IPC_STRUCT_TRAITS_MEMBER(use_autohinter) |
| IPC_STRUCT_TRAITS_MEMBER(use_bitmaps) |
| IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) |
| IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning) |
| IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) |
| IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color) |
| IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color) |
| IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color) |
| IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color) |
| IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests) |
| IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval) |
| IPC_STRUCT_TRAITS_MEMBER(use_custom_colors) |
| IPC_STRUCT_TRAITS_MEMBER(enable_referrers) |
| IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track) |
| IPC_STRUCT_TRAITS_MEMBER(enable_encrypted_media) |
| IPC_STRUCT_TRAITS_MEMBER(webrtc_ip_handling_policy) |
| IPC_STRUCT_TRAITS_MEMBER(webrtc_udp_min_port) |
| IPC_STRUCT_TRAITS_MEMBER(webrtc_udp_max_port) |
| IPC_STRUCT_TRAITS_MEMBER(user_agent_override) |
| IPC_STRUCT_TRAITS_MEMBER(accept_languages) |
| IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) |
| IPC_STRUCT_TRAITS_MEMBER(caret_browsing_enabled) |
| #if defined(OS_LINUX) || defined(OS_CHROMEOS) |
| IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) |
| #endif |
| #if defined(OS_WIN) |
| IPC_STRUCT_TRAITS_MEMBER(caption_font_family_name) |
| IPC_STRUCT_TRAITS_MEMBER(caption_font_height) |
| IPC_STRUCT_TRAITS_MEMBER(small_caption_font_family_name) |
| IPC_STRUCT_TRAITS_MEMBER(small_caption_font_height) |
| IPC_STRUCT_TRAITS_MEMBER(menu_font_family_name) |
| IPC_STRUCT_TRAITS_MEMBER(menu_font_height) |
| IPC_STRUCT_TRAITS_MEMBER(status_font_family_name) |
| IPC_STRUCT_TRAITS_MEMBER(status_font_height) |
| IPC_STRUCT_TRAITS_MEMBER(message_font_family_name) |
| IPC_STRUCT_TRAITS_MEMBER(message_font_height) |
| IPC_STRUCT_TRAITS_MEMBER(vertical_scroll_bar_width_in_dips) |
| IPC_STRUCT_TRAITS_MEMBER(horizontal_scroll_bar_height_in_dips) |
| IPC_STRUCT_TRAITS_MEMBER(arrow_bitmap_height_vertical_scroll_bar_in_dips) |
| IPC_STRUCT_TRAITS_MEMBER(arrow_bitmap_width_horizontal_scroll_bar_in_dips) |
| #endif |
| #if defined(USE_X11) || defined(USE_OZONE) |
| IPC_STRUCT_TRAITS_MEMBER(selection_clipboard_buffer_available) |
| #endif |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_ENUM_TRAITS(blink::DragOperation) // Bitmask. |
| IPC_ENUM_TRAITS_MAX_VALUE(content::DropData::Kind, |
| content::DropData::Kind::LAST) |
| |
| IPC_STRUCT_TRAITS_BEGIN(ui::FileInfo) |
| IPC_STRUCT_TRAITS_MEMBER(path) |
| IPC_STRUCT_TRAITS_MEMBER(display_name) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(content::DropData) |
| IPC_STRUCT_TRAITS_MEMBER(url) |
| IPC_STRUCT_TRAITS_MEMBER(url_title) |
| IPC_STRUCT_TRAITS_MEMBER(download_metadata) |
| IPC_STRUCT_TRAITS_MEMBER(referrer_policy) |
| IPC_STRUCT_TRAITS_MEMBER(filenames) |
| IPC_STRUCT_TRAITS_MEMBER(filesystem_id) |
| IPC_STRUCT_TRAITS_MEMBER(file_system_files) |
| IPC_STRUCT_TRAITS_MEMBER(text) |
| IPC_STRUCT_TRAITS_MEMBER(html) |
| IPC_STRUCT_TRAITS_MEMBER(html_base_url) |
| IPC_STRUCT_TRAITS_MEMBER(file_contents) |
| IPC_STRUCT_TRAITS_MEMBER(file_contents_source_url) |
| IPC_STRUCT_TRAITS_MEMBER(file_contents_filename_extension) |
| IPC_STRUCT_TRAITS_MEMBER(file_contents_content_disposition) |
| IPC_STRUCT_TRAITS_MEMBER(custom_data) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(content::DropData::FileSystemFileInfo) |
| IPC_STRUCT_TRAITS_MEMBER(url) |
| IPC_STRUCT_TRAITS_MEMBER(size) |
| IPC_STRUCT_TRAITS_MEMBER(filesystem_id) |
| IPC_STRUCT_TRAITS_END() |
| |
| IPC_STRUCT_TRAITS_BEGIN(content::DropData::Metadata) |
| IPC_STRUCT_TRAITS_MEMBER(kind) |
| IPC_STRUCT_TRAITS_MEMBER(mime_type) |
| IPC_STRUCT_TRAITS_MEMBER(filename) |
| IPC_STRUCT_TRAITS_MEMBER(file_system_url) |
| IPC_STRUCT_TRAITS_END() |
| |
| #endif // CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_ |