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/view_message_enums.h" | 14 #include "content/common/view_message_enums.h" |
15 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
16 #include "content/public/common/file_chooser_params.h" | 16 #include "content/public/common/file_chooser_params.h" |
17 #include "content/public/common/frame_navigate_params.h" | 17 #include "content/public/common/frame_navigate_params.h" |
18 #include "content/public/common/page_zoom.h" | 18 #include "content/public/common/page_zoom.h" |
| 19 #include "content/public/common/referrer.h" |
19 #include "content/public/common/renderer_preferences.h" | 20 #include "content/public/common/renderer_preferences.h" |
20 #include "content/public/common/stop_find_action.h" | 21 #include "content/public/common/stop_find_action.h" |
21 #include "content/public/common/webkit_param_traits.h" | 22 #include "content/public/common/webkit_param_traits.h" |
22 #include "content/public/common/window_container_type.h" | 23 #include "content/public/common/window_container_type.h" |
23 #include "ipc/ipc_channel_handle.h" | 24 #include "ipc/ipc_channel_handle.h" |
24 #include "ipc/ipc_message_macros.h" | 25 #include "ipc/ipc_message_macros.h" |
25 #include "ipc/ipc_platform_file.h" | 26 #include "ipc/ipc_platform_file.h" |
26 #include "media/base/media_log_event.h" | 27 #include "media/base/media_log_event.h" |
27 #include "third_party/skia/include/core/SkBitmap.h" | 28 #include "third_party/skia/include/core/SkBitmap.h" |
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" |
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
34 #include "ui/base/ime/text_input_type.h" | 36 #include "ui/base/ime/text_input_type.h" |
35 #include "ui/base/range/range.h" | 37 #include "ui/base/range/range.h" |
36 #include "ui/gfx/rect.h" | 38 #include "ui/gfx/rect.h" |
37 #include "webkit/glue/context_menu.h" | 39 #include "webkit/glue/context_menu.h" |
38 #include "webkit/glue/webcookie.h" | 40 #include "webkit/glue/webcookie.h" |
39 #include "webkit/glue/webmenuitem.h" | 41 #include "webkit/glue/webmenuitem.h" |
40 #include "webkit/glue/webpreferences.h" | 42 #include "webkit/glue/webpreferences.h" |
41 #include "webkit/glue/webaccessibility.h" | 43 #include "webkit/glue/webaccessibility.h" |
42 #include "webkit/plugins/npapi/webplugin.h" | 44 #include "webkit/plugins/npapi/webplugin.h" |
43 | 45 |
44 #if defined(OS_MACOSX) | 46 #if defined(OS_MACOSX) |
45 #include "content/common/mac/font_descriptor.h" | 47 #include "content/common/mac/font_descriptor.h" |
46 #endif | 48 #endif |
47 | 49 |
48 #undef IPC_MESSAGE_EXPORT | 50 #undef IPC_MESSAGE_EXPORT |
49 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 51 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
50 | 52 |
51 #define IPC_MESSAGE_START ViewMsgStart | 53 #define IPC_MESSAGE_START ViewMsgStart |
52 | 54 |
53 IPC_ENUM_TRAITS(CSSColors::CSSColorName) | 55 IPC_ENUM_TRAITS(CSSColors::CSSColorName) |
54 IPC_ENUM_TRAITS(NavigationGesture) | 56 IPC_ENUM_TRAITS(NavigationGesture) |
55 IPC_ENUM_TRAITS(ViewHostMsg_AccEvent::Value) | 57 IPC_ENUM_TRAITS(ViewHostMsg_AccEvent::Value) |
56 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) | 58 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) |
57 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) | 59 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) |
58 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) | 60 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) |
59 IPC_ENUM_TRAITS(WebKit::WebPopupType) | 61 IPC_ENUM_TRAITS(WebKit::WebPopupType) |
| 62 IPC_ENUM_TRAITS(WebKit::WebReferrerPolicy) |
60 IPC_ENUM_TRAITS(WebKit::WebTextDirection) | 63 IPC_ENUM_TRAITS(WebKit::WebTextDirection) |
61 IPC_ENUM_TRAITS(WebMenuItem::Type) | 64 IPC_ENUM_TRAITS(WebMenuItem::Type) |
62 IPC_ENUM_TRAITS(WindowContainerType) | 65 IPC_ENUM_TRAITS(WindowContainerType) |
63 IPC_ENUM_TRAITS(content::FileChooserParams::Mode) | 66 IPC_ENUM_TRAITS(content::FileChooserParams::Mode) |
64 IPC_ENUM_TRAITS(content::PageZoom) | 67 IPC_ENUM_TRAITS(content::PageZoom) |
65 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) | 68 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) |
66 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) | 69 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) |
67 IPC_ENUM_TRAITS(content::StopFindAction) | 70 IPC_ENUM_TRAITS(content::StopFindAction) |
68 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) | 71 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) |
69 IPC_ENUM_TRAITS(ui::TextInputType) | 72 IPC_ENUM_TRAITS(ui::TextInputType) |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 IPC_STRUCT_TRAITS_MEMBER(transition) | 256 IPC_STRUCT_TRAITS_MEMBER(transition) |
254 IPC_STRUCT_TRAITS_MEMBER(redirects) | 257 IPC_STRUCT_TRAITS_MEMBER(redirects) |
255 IPC_STRUCT_TRAITS_MEMBER(should_update_history) | 258 IPC_STRUCT_TRAITS_MEMBER(should_update_history) |
256 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) | 259 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) |
257 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding) | 260 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding) |
258 IPC_STRUCT_TRAITS_MEMBER(password_form) | 261 IPC_STRUCT_TRAITS_MEMBER(password_form) |
259 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type) | 262 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type) |
260 IPC_STRUCT_TRAITS_MEMBER(socket_address) | 263 IPC_STRUCT_TRAITS_MEMBER(socket_address) |
261 IPC_STRUCT_TRAITS_END() | 264 IPC_STRUCT_TRAITS_END() |
262 | 265 |
| 266 IPC_STRUCT_TRAITS_BEGIN(content::Referrer) |
| 267 IPC_STRUCT_TRAITS_MEMBER(url) |
| 268 IPC_STRUCT_TRAITS_MEMBER(policy) |
| 269 IPC_STRUCT_TRAITS_END() |
| 270 |
263 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) | 271 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) |
264 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) | 272 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) |
265 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) | 273 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) |
266 IPC_STRUCT_TRAITS_MEMBER(hinting) | 274 IPC_STRUCT_TRAITS_MEMBER(hinting) |
267 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) | 275 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) |
268 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) | 276 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) |
269 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) | 277 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) |
270 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color) | 278 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color) |
271 IPC_STRUCT_TRAITS_MEMBER(track_color) | 279 IPC_STRUCT_TRAITS_MEMBER(track_color) |
272 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color) | 280 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color) |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 // Informs the RenderView of where its current page contents reside in | 575 // Informs the RenderView of where its current page contents reside in |
568 // session history and the total size of the session history list. | 576 // session history and the total size of the session history list. |
569 IPC_STRUCT_MEMBER(int, current_history_list_offset) | 577 IPC_STRUCT_MEMBER(int, current_history_list_offset) |
570 IPC_STRUCT_MEMBER(int, current_history_list_length) | 578 IPC_STRUCT_MEMBER(int, current_history_list_length) |
571 | 579 |
572 // The URL to load. | 580 // The URL to load. |
573 IPC_STRUCT_MEMBER(GURL, url) | 581 IPC_STRUCT_MEMBER(GURL, url) |
574 | 582 |
575 // The URL to send in the "Referer" header field. Can be empty if there is | 583 // The URL to send in the "Referer" header field. Can be empty if there is |
576 // no referrer. | 584 // no referrer. |
577 // TODO: consider folding this into extra_headers. | 585 IPC_STRUCT_MEMBER(content::Referrer, referrer) |
578 IPC_STRUCT_MEMBER(GURL, referrer) | |
579 | 586 |
580 // The type of transition. | 587 // The type of transition. |
581 IPC_STRUCT_MEMBER(content::PageTransition, transition) | 588 IPC_STRUCT_MEMBER(content::PageTransition, transition) |
582 | 589 |
583 // Opaque history state (received by ViewHostMsg_UpdateState). | 590 // Opaque history state (received by ViewHostMsg_UpdateState). |
584 IPC_STRUCT_MEMBER(std::string, state) | 591 IPC_STRUCT_MEMBER(std::string, state) |
585 | 592 |
586 // Type of navigation. | 593 // Type of navigation. |
587 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value, navigation_type) | 594 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value, navigation_type) |
588 | 595 |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 string16 /* in - alert message */, | 1582 string16 /* in - alert message */, |
1576 string16 /* in - default prompt */, | 1583 string16 /* in - default prompt */, |
1577 GURL /* in - originating page URL */, | 1584 GURL /* in - originating page URL */, |
1578 int /* in - dialog flags */, | 1585 int /* in - dialog flags */, |
1579 bool /* out - success */, | 1586 bool /* out - success */, |
1580 string16 /* out - user_input field */) | 1587 string16 /* out - user_input field */) |
1581 | 1588 |
1582 // Requests that the given URL be opened in the specified manner. | 1589 // Requests that the given URL be opened in the specified manner. |
1583 IPC_MESSAGE_ROUTED4(ViewHostMsg_OpenURL, | 1590 IPC_MESSAGE_ROUTED4(ViewHostMsg_OpenURL, |
1584 GURL /* url */, | 1591 GURL /* url */, |
1585 GURL /* referrer */, | 1592 content::Referrer /* referrer */, |
1586 WindowOpenDisposition /* disposition */, | 1593 WindowOpenDisposition /* disposition */, |
1587 int64 /* frame id */) | 1594 int64 /* frame id */) |
1588 | 1595 |
1589 // Notifies that the preferred size of the content changed. | 1596 // Notifies that the preferred size of the content changed. |
1590 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange, | 1597 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange, |
1591 gfx::Size /* pref_size */) | 1598 gfx::Size /* pref_size */) |
1592 | 1599 |
1593 // Notifies that the scrollbars-visible state of the content changed. | 1600 // Notifies that the scrollbars-visible state of the content changed. |
1594 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, | 1601 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, |
1595 bool /* has_horizontal_scrollbar */, | 1602 bool /* has_horizontal_scrollbar */, |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1943 media::MediaLogEvent /* event */) | 1950 media::MediaLogEvent /* event */) |
1944 | 1951 |
1945 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message | 1952 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message |
1946 // being sent back. | 1953 // being sent back. |
1947 IPC_MESSAGE_ROUTED0(ViewHostMsg_LockMouse) | 1954 IPC_MESSAGE_ROUTED0(ViewHostMsg_LockMouse) |
1948 | 1955 |
1949 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent | 1956 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent |
1950 // whenever the mouse is unlocked (which may or may not be caused by | 1957 // whenever the mouse is unlocked (which may or may not be caused by |
1951 // ViewHostMsg_UnlockMouse). | 1958 // ViewHostMsg_UnlockMouse). |
1952 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse) | 1959 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse) |
OLD | NEW |