| 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 // IPC messages for page rendering. | 5 // IPC messages for page rendering. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/process.h" | 8 #include "base/process.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/common/css_colors.h" | 11 #include "content/common/css_colors.h" |
| 12 #include "content/common/edit_command.h" | 12 #include "content/common/edit_command.h" |
| 13 #include "content/common/navigation_gesture.h" | 13 #include "content/common/navigation_gesture.h" |
| 14 #include "content/common/renderer_preferences.h" | |
| 15 #include "content/common/view_message_enums.h" | 14 #include "content/common/view_message_enums.h" |
| 16 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
| 17 #include "content/public/common/page_zoom.h" | 16 #include "content/public/common/page_zoom.h" |
| 17 #include "content/public/common/renderer_preferences.h" |
| 18 #include "content/public/common/webkit_param_traits.h" | 18 #include "content/public/common/webkit_param_traits.h" |
| 19 #include "content/public/common/window_container_type.h" | 19 #include "content/public/common/window_container_type.h" |
| 20 #include "ipc/ipc_channel_handle.h" | 20 #include "ipc/ipc_channel_handle.h" |
| 21 #include "ipc/ipc_message_macros.h" | 21 #include "ipc/ipc_message_macros.h" |
| 22 #include "ipc/ipc_platform_file.h" | 22 #include "ipc/ipc_platform_file.h" |
| 23 #include "media/base/media_log_event.h" | 23 #include "media/base/media_log_event.h" |
| 24 #include "net/base/host_port_pair.h" | 24 #include "net/base/host_port_pair.h" |
| 25 #include "third_party/skia/include/core/SkBitmap.h" | 25 #include "third_party/skia/include/core/SkBitmap.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
| 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #undef IPC_MESSAGE_EXPORT | 47 #undef IPC_MESSAGE_EXPORT |
| 48 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 48 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 49 | 49 |
| 50 #define IPC_MESSAGE_START ViewMsgStart | 50 #define IPC_MESSAGE_START ViewMsgStart |
| 51 | 51 |
| 52 IPC_ENUM_TRAITS(CSSColors::CSSColorName) | 52 IPC_ENUM_TRAITS(CSSColors::CSSColorName) |
| 53 IPC_ENUM_TRAITS(NavigationGesture) | 53 IPC_ENUM_TRAITS(NavigationGesture) |
| 54 IPC_ENUM_TRAITS(content::PageZoom) | 54 IPC_ENUM_TRAITS(content::PageZoom) |
| 55 IPC_ENUM_TRAITS(RendererPreferencesHintingEnum) | |
| 56 IPC_ENUM_TRAITS(RendererPreferencesSubpixelRenderingEnum) | |
| 57 IPC_ENUM_TRAITS(ViewHostMsg_AccEvent::Value) | 55 IPC_ENUM_TRAITS(ViewHostMsg_AccEvent::Value) |
| 58 IPC_ENUM_TRAITS(ViewHostMsg_RunFileChooser_Mode::Value) | 56 IPC_ENUM_TRAITS(ViewHostMsg_RunFileChooser_Mode::Value) |
| 59 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) | 57 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) |
| 60 IPC_ENUM_TRAITS(ViewMsg_StopFinding_Params::Action) | 58 IPC_ENUM_TRAITS(ViewMsg_StopFinding_Params::Action) |
| 61 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) | 59 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) |
| 62 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) | 60 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) |
| 63 IPC_ENUM_TRAITS(WebKit::WebPopupType) | 61 IPC_ENUM_TRAITS(WebKit::WebPopupType) |
| 64 IPC_ENUM_TRAITS(WebKit::WebTextDirection) | 62 IPC_ENUM_TRAITS(WebKit::WebTextDirection) |
| 65 IPC_ENUM_TRAITS(ui::TextInputType) | |
| 66 IPC_ENUM_TRAITS(WebMenuItem::Type) | 63 IPC_ENUM_TRAITS(WebMenuItem::Type) |
| 67 IPC_ENUM_TRAITS(WindowContainerType) | 64 IPC_ENUM_TRAITS(WindowContainerType) |
| 65 IPC_ENUM_TRAITS(ui::TextInputType) |
| 66 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) |
| 67 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) |
| 68 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) |
| 68 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::BoolAttribute) | 69 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::BoolAttribute) |
| 69 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::FloatAttribute) | 70 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::FloatAttribute) |
| 70 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::IntAttribute) | 71 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::IntAttribute) |
| 71 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::Role) | 72 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::Role) |
| 72 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::State) | 73 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::State) |
| 73 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::StringAttribute) | 74 IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::StringAttribute) |
| 74 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) | |
| 75 | 75 |
| 76 IPC_STRUCT_TRAITS_BEGIN(ContextMenuParams) | 76 IPC_STRUCT_TRAITS_BEGIN(ContextMenuParams) |
| 77 IPC_STRUCT_TRAITS_MEMBER(media_type) | 77 IPC_STRUCT_TRAITS_MEMBER(media_type) |
| 78 IPC_STRUCT_TRAITS_MEMBER(x) | 78 IPC_STRUCT_TRAITS_MEMBER(x) |
| 79 IPC_STRUCT_TRAITS_MEMBER(y) | 79 IPC_STRUCT_TRAITS_MEMBER(y) |
| 80 IPC_STRUCT_TRAITS_MEMBER(link_url) | 80 IPC_STRUCT_TRAITS_MEMBER(link_url) |
| 81 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url) | 81 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url) |
| 82 IPC_STRUCT_TRAITS_MEMBER(src_url) | 82 IPC_STRUCT_TRAITS_MEMBER(src_url) |
| 83 IPC_STRUCT_TRAITS_MEMBER(is_image_blocked) | 83 IPC_STRUCT_TRAITS_MEMBER(is_image_blocked) |
| 84 IPC_STRUCT_TRAITS_MEMBER(page_url) | 84 IPC_STRUCT_TRAITS_MEMBER(page_url) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 109 IPC_STRUCT_TRAITS_MEMBER(value) | 109 IPC_STRUCT_TRAITS_MEMBER(value) |
| 110 IPC_STRUCT_TRAITS_END() | 110 IPC_STRUCT_TRAITS_END() |
| 111 | 111 |
| 112 #if defined(OS_MACOSX) | 112 #if defined(OS_MACOSX) |
| 113 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) | 113 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) |
| 114 IPC_STRUCT_TRAITS_MEMBER(font_name) | 114 IPC_STRUCT_TRAITS_MEMBER(font_name) |
| 115 IPC_STRUCT_TRAITS_MEMBER(font_point_size) | 115 IPC_STRUCT_TRAITS_MEMBER(font_point_size) |
| 116 IPC_STRUCT_TRAITS_END() | 116 IPC_STRUCT_TRAITS_END() |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 IPC_STRUCT_TRAITS_BEGIN(RendererPreferences) | 119 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) |
| 120 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) | 120 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) |
| 121 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) | 121 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) |
| 122 IPC_STRUCT_TRAITS_MEMBER(hinting) | 122 IPC_STRUCT_TRAITS_MEMBER(hinting) |
| 123 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) | 123 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) |
| 124 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) | 124 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) |
| 125 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) | 125 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) |
| 126 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color) | 126 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color) |
| 127 IPC_STRUCT_TRAITS_MEMBER(track_color) | 127 IPC_STRUCT_TRAITS_MEMBER(track_color) |
| 128 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color) | 128 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color) |
| 129 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color) | 129 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color) |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 // Extra headers (separated by \n) to send during the request. | 625 // Extra headers (separated by \n) to send during the request. |
| 626 IPC_STRUCT_MEMBER(std::string, extra_headers) | 626 IPC_STRUCT_MEMBER(std::string, extra_headers) |
| 627 IPC_STRUCT_END() | 627 IPC_STRUCT_END() |
| 628 | 628 |
| 629 IPC_STRUCT_BEGIN(ViewMsg_New_Params) | 629 IPC_STRUCT_BEGIN(ViewMsg_New_Params) |
| 630 // The parent window's id. | 630 // The parent window's id. |
| 631 IPC_STRUCT_MEMBER(gfx::NativeViewId, parent_window) | 631 IPC_STRUCT_MEMBER(gfx::NativeViewId, parent_window) |
| 632 | 632 |
| 633 // Renderer-wide preferences. | 633 // Renderer-wide preferences. |
| 634 IPC_STRUCT_MEMBER(RendererPreferences, renderer_preferences) | 634 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences) |
| 635 | 635 |
| 636 // Preferences for this view. | 636 // Preferences for this view. |
| 637 IPC_STRUCT_MEMBER(WebPreferences, web_preferences) | 637 IPC_STRUCT_MEMBER(WebPreferences, web_preferences) |
| 638 | 638 |
| 639 // The ID of the view to be created. | 639 // The ID of the view to be created. |
| 640 IPC_STRUCT_MEMBER(int32, view_id) | 640 IPC_STRUCT_MEMBER(int32, view_id) |
| 641 | 641 |
| 642 // The session storage namespace ID this view should use. | 642 // The session storage namespace ID this view should use. |
| 643 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) | 643 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) |
| 644 | 644 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 ViewMsg_New_Params) | 696 ViewMsg_New_Params) |
| 697 | 697 |
| 698 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget. | 698 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget. |
| 699 // similar to the new command, but used when the renderer created a view | 699 // similar to the new command, but used when the renderer created a view |
| 700 // first, and we need to update it. | 700 // first, and we need to update it. |
| 701 IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK, | 701 IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK, |
| 702 gfx::NativeViewId /* parent_hwnd */) | 702 gfx::NativeViewId /* parent_hwnd */) |
| 703 | 703 |
| 704 // Sends updated preferences to the renderer. | 704 // Sends updated preferences to the renderer. |
| 705 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs, | 705 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs, |
| 706 RendererPreferences) | 706 content::RendererPreferences) |
| 707 | 707 |
| 708 // This passes a set of webkit preferences down to the renderer. | 708 // This passes a set of webkit preferences down to the renderer. |
| 709 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences, | 709 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences, |
| 710 WebPreferences) | 710 WebPreferences) |
| 711 | 711 |
| 712 // Tells the render view to close. | 712 // Tells the render view to close. |
| 713 IPC_MESSAGE_ROUTED0(ViewMsg_Close) | 713 IPC_MESSAGE_ROUTED0(ViewMsg_Close) |
| 714 | 714 |
| 715 // Tells the render view to change its size. A ViewHostMsg_PaintRect message | 715 // Tells the render view to change its size. A ViewHostMsg_PaintRect message |
| 716 // is generated in response provided new_size is not empty and not equal to | 716 // is generated in response provided new_size is not empty and not equal to |
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 media::MediaLogEvent /* event */) | 1938 media::MediaLogEvent /* event */) |
| 1939 | 1939 |
| 1940 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message | 1940 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message |
| 1941 // being sent back. | 1941 // being sent back. |
| 1942 IPC_MESSAGE_ROUTED0(ViewHostMsg_LockMouse) | 1942 IPC_MESSAGE_ROUTED0(ViewHostMsg_LockMouse) |
| 1943 | 1943 |
| 1944 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent | 1944 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent |
| 1945 // whenever the mouse is unlocked (which may or may not be caused by | 1945 // whenever the mouse is unlocked (which may or may not be caused by |
| 1946 // ViewHostMsg_UnlockMouse). | 1946 // ViewHostMsg_UnlockMouse). |
| 1947 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse) | 1947 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse) |
| OLD | NEW |