| 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/common_param_traits.h" | 10 #include "content/common/common_param_traits.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/common/css_colors.h" | 12 #include "content/common/css_colors.h" |
| 13 #include "content/common/edit_command.h" | 13 #include "content/common/edit_command.h" |
| 14 #include "content/common/navigation_gesture.h" | 14 #include "content/common/navigation_gesture.h" |
| 15 #include "content/common/page_transition_types.h" | 15 #include "content/common/page_transition_types.h" |
| 16 #include "content/common/page_zoom.h" | 16 #include "content/common/page_zoom.h" |
| 17 #include "content/common/renderer_preferences.h" | 17 #include "content/common/renderer_preferences.h" |
| 18 #include "content/common/view_message_enums.h" |
| 18 #include "content/common/webkit_param_traits.h" | 19 #include "content/common/webkit_param_traits.h" |
| 19 #include "content/common/window_container_type.h" | 20 #include "content/common/window_container_type.h" |
| 20 #include "ipc/ipc_channel_handle.h" | 21 #include "ipc/ipc_channel_handle.h" |
| 21 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.h" |
| 22 #include "ipc/ipc_platform_file.h" | 23 #include "ipc/ipc_platform_file.h" |
| 23 #include "media/base/media_log_event.h" | 24 #include "media/base/media_log_event.h" |
| 24 #include "net/base/host_port_pair.h" | 25 #include "net/base/host_port_pair.h" |
| 25 #include "third_party/skia/include/core/SkBitmap.h" | 26 #include "third_party/skia/include/core/SkBitmap.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
| 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
| 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" |
| 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
| 31 #include "ui/base/ime/text_input_type.h" | 32 #include "ui/base/ime/text_input_type.h" |
| 32 #include "ui/base/range/range.h" | 33 #include "ui/base/range/range.h" |
| 33 #include "ui/gfx/rect.h" | 34 #include "ui/gfx/rect.h" |
| 34 #include "webkit/glue/context_menu.h" | 35 #include "webkit/glue/context_menu.h" |
| 35 #include "webkit/glue/password_form.h" | 36 #include "webkit/glue/password_form.h" |
| 36 #include "webkit/glue/webcookie.h" | 37 #include "webkit/glue/webcookie.h" |
| 37 #include "webkit/glue/webmenuitem.h" | 38 #include "webkit/glue/webmenuitem.h" |
| 38 #include "webkit/glue/webpreferences.h" | 39 #include "webkit/glue/webpreferences.h" |
| 39 #include "webkit/glue/webaccessibility.h" | 40 #include "webkit/glue/webaccessibility.h" |
| 40 #include "webkit/plugins/npapi/webplugin.h" | 41 #include "webkit/plugins/npapi/webplugin.h" |
| 41 #include "webkit/plugins/webplugininfo.h" | 42 #include "webkit/plugins/webplugininfo.h" |
| 42 | 43 |
| 43 #if defined(OS_MACOSX) | 44 #if defined(OS_MACOSX) |
| 44 #include "content/common/mac/font_descriptor.h" | 45 #include "content/common/mac/font_descriptor.h" |
| 45 #endif | 46 #endif |
| 46 | 47 |
| 47 // Define enums used in this file inside an include-guard. | |
| 48 #ifndef CONTENT_COMMON_VIEW_MESSAGES_H_ | |
| 49 #define CONTENT_COMMON_VIEW_MESSAGES_H_ | |
| 50 | |
| 51 struct ViewHostMsg_AccEvent { | |
| 52 enum Value { | |
| 53 // The active descendant of a node has changed. | |
| 54 ACTIVE_DESCENDANT_CHANGED, | |
| 55 | |
| 56 // An alert appeared. | |
| 57 ALERT, | |
| 58 | |
| 59 // The node checked state has changed. | |
| 60 CHECK_STATE_CHANGED, | |
| 61 | |
| 62 // The node tree structure has changed. | |
| 63 CHILDREN_CHANGED, | |
| 64 | |
| 65 // The node in focus has changed. | |
| 66 FOCUS_CHANGED, | |
| 67 | |
| 68 // Page layout has completed. | |
| 69 LAYOUT_COMPLETE, | |
| 70 | |
| 71 // Content within a part of the page marked as a live region changed. | |
| 72 LIVE_REGION_CHANGED, | |
| 73 | |
| 74 // The document node has loaded. | |
| 75 LOAD_COMPLETE, | |
| 76 | |
| 77 // A menu list value changed. | |
| 78 MENU_LIST_VALUE_CHANGED, | |
| 79 | |
| 80 // An object was shown. | |
| 81 OBJECT_SHOW, | |
| 82 | |
| 83 // An object was hidden. | |
| 84 OBJECT_HIDE, | |
| 85 | |
| 86 // The number of rows in a grid or tree control changed. | |
| 87 ROW_COUNT_CHANGED, | |
| 88 | |
| 89 // A row in a grid or tree control was collapsed. | |
| 90 ROW_COLLAPSED, | |
| 91 | |
| 92 // A row in a grid or tree control was expanded. | |
| 93 ROW_EXPANDED, | |
| 94 | |
| 95 // The document was scrolled to an anchor node. | |
| 96 SCROLLED_TO_ANCHOR, | |
| 97 | |
| 98 // One or more selected children of this node have changed. | |
| 99 SELECTED_CHILDREN_CHANGED, | |
| 100 | |
| 101 // The text cursor or selection changed. | |
| 102 SELECTED_TEXT_CHANGED, | |
| 103 | |
| 104 // Text was inserted in a node with text content. | |
| 105 TEXT_INSERTED, | |
| 106 | |
| 107 // Text was removed in a node with text content. | |
| 108 TEXT_REMOVED, | |
| 109 | |
| 110 // The node value has changed. | |
| 111 VALUE_CHANGED, | |
| 112 }; | |
| 113 }; | |
| 114 | |
| 115 // Values that may be OR'd together to form the 'flags' parameter of the | |
| 116 // ViewMsg_EnablePreferredSizeChangedMode message. | |
| 117 enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { | |
| 118 kPreferredSizeNothing, | |
| 119 kPreferredSizeWidth = 1 << 0, | |
| 120 // Requesting the height currently requires a polling loop in render_view.cc. | |
| 121 kPreferredSizeHeightThisIsSlow = 1 << 1, | |
| 122 }; | |
| 123 | |
| 124 struct ViewHostMsg_RunFileChooser_Mode { | |
| 125 public: | |
| 126 enum Value { | |
| 127 // Requires that the file exists before allowing the user to pick it. | |
| 128 Open, | |
| 129 | |
| 130 // Like Open, but allows picking multiple files to open. | |
| 131 OpenMultiple, | |
| 132 | |
| 133 // Like Open, but selects a folder. | |
| 134 OpenFolder, | |
| 135 | |
| 136 // Allows picking a nonexistent file, and prompts to overwrite if the file | |
| 137 // already exists. | |
| 138 Save, | |
| 139 }; | |
| 140 }; | |
| 141 | |
| 142 // Values that may be OR'd together to form the 'flags' parameter of a | |
| 143 // ViewHostMsg_UpdateRect_Params structure. | |
| 144 struct ViewHostMsg_UpdateRect_Flags { | |
| 145 enum { | |
| 146 IS_RESIZE_ACK = 1 << 0, | |
| 147 IS_RESTORE_ACK = 1 << 1, | |
| 148 IS_REPAINT_ACK = 1 << 2, | |
| 149 }; | |
| 150 static bool is_resize_ack(int flags) { | |
| 151 return (flags & IS_RESIZE_ACK) != 0; | |
| 152 } | |
| 153 static bool is_restore_ack(int flags) { | |
| 154 return (flags & IS_RESTORE_ACK) != 0; | |
| 155 } | |
| 156 static bool is_repaint_ack(int flags) { | |
| 157 return (flags & IS_REPAINT_ACK) != 0; | |
| 158 } | |
| 159 }; | |
| 160 | |
| 161 struct ViewMsg_Navigate_Type { | |
| 162 public: | |
| 163 enum Value { | |
| 164 // Reload the page. | |
| 165 RELOAD, | |
| 166 | |
| 167 // Reload the page, ignoring any cache entries. | |
| 168 RELOAD_IGNORING_CACHE, | |
| 169 | |
| 170 // The navigation is the result of session restore and should honor the | |
| 171 // page's cache policy while restoring form state. This is set to true if | |
| 172 // restoring a tab/session from the previous session and the previous | |
| 173 // session did not crash. If this is not set and the page was restored then | |
| 174 // the page's cache policy is ignored and we load from the cache. | |
| 175 RESTORE, | |
| 176 | |
| 177 // Navigation type not categorized by the other types. | |
| 178 NORMAL | |
| 179 }; | |
| 180 }; | |
| 181 | |
| 182 // The user has completed a find-in-page; this type defines what actions the | |
| 183 // renderer should take next. | |
| 184 struct ViewMsg_StopFinding_Params { | |
| 185 enum Action { | |
| 186 kClearSelection, | |
| 187 kKeepSelection, | |
| 188 kActivateSelection | |
| 189 }; | |
| 190 | |
| 191 ViewMsg_StopFinding_Params() : action(kClearSelection) {} | |
| 192 | |
| 193 // The action that should be taken when the find is completed. | |
| 194 Action action; | |
| 195 }; | |
| 196 | |
| 197 #endif // CONTENT_COMMON_VIEW_MESSAGES_H_ | |
| 198 | |
| 199 #undef IPC_MESSAGE_EXPORT | 48 #undef IPC_MESSAGE_EXPORT |
| 200 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 49 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 201 | 50 |
| 202 #define IPC_MESSAGE_START ViewMsgStart | 51 #define IPC_MESSAGE_START ViewMsgStart |
| 203 | 52 |
| 204 IPC_ENUM_TRAITS(CSSColors::CSSColorName) | 53 IPC_ENUM_TRAITS(CSSColors::CSSColorName) |
| 205 IPC_ENUM_TRAITS(NavigationGesture) | 54 IPC_ENUM_TRAITS(NavigationGesture) |
| 206 IPC_ENUM_TRAITS(PageZoom::Function) | 55 IPC_ENUM_TRAITS(PageZoom::Function) |
| 207 IPC_ENUM_TRAITS(RendererPreferencesHintingEnum) | 56 IPC_ENUM_TRAITS(RendererPreferencesHintingEnum) |
| 208 IPC_ENUM_TRAITS(RendererPreferencesSubpixelRenderingEnum) | 57 IPC_ENUM_TRAITS(RendererPreferencesSubpixelRenderingEnum) |
| (...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2079 int32 /* complete status */) | 1928 int32 /* complete status */) |
| 2080 | 1929 |
| 2081 // Request updated information about the client firewall traversal policy. | 1930 // Request updated information about the client firewall traversal policy. |
| 2082 // Will result in a ViewMsg_UpdateRemoteAccessClientFirewallTraversal message | 1931 // Will result in a ViewMsg_UpdateRemoteAccessClientFirewallTraversal message |
| 2083 // being sent back. | 1932 // being sent back. |
| 2084 IPC_MESSAGE_ROUTED0(ViewHostMsg_RequestRemoteAccessClientFirewallTraversal) | 1933 IPC_MESSAGE_ROUTED0(ViewHostMsg_RequestRemoteAccessClientFirewallTraversal) |
| 2085 | 1934 |
| 2086 // Notifies the browser of an event occurring in the media pipeline. | 1935 // Notifies the browser of an event occurring in the media pipeline. |
| 2087 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvent, | 1936 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvent, |
| 2088 media::MediaLogEvent /* event */) | 1937 media::MediaLogEvent /* event */) |
| OLD | NEW |