Update V8 to version 4.7.57.
[chromium-blink-merge.git] / android_webview / common / render_view_messages.h
blob91dbb5bf25ecc02daf9ca9c63955298f4e70fdcc
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
3 // found in the LICENSE file.
5 // Multiply-included file, no traditional include guard.
6 #include "android_webview/common/aw_hit_test_data.h"
7 #include "content/public/common/common_param_traits.h"
8 #include "ipc/ipc_channel_handle.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "ipc/ipc_platform_file.h"
11 #include "third_party/skia/include/core/SkColor.h"
12 #include "ui/gfx/geometry/point_f.h"
13 #include "ui/gfx/geometry/size_f.h"
14 #include "ui/gfx/ipc/gfx_param_traits.h"
16 // Singly-included section for enums and custom IPC traits.
17 #ifndef ANDROID_WEBVIEW_COMMON_RENDER_VIEW_MESSAGES_H_
18 #define ANDROID_WEBVIEW_COMMON_RENDER_VIEW_MESSAGES_H_
20 namespace IPC {
22 // TODO - add enums and custom IPC traits here when needed.
24 } // namespace IPC
26 #endif // ANDROID_WEBVIEW_COMMON_RENDER_VIEW_MESSAGES_H_
28 IPC_STRUCT_TRAITS_BEGIN(android_webview::AwHitTestData)
29 IPC_STRUCT_TRAITS_MEMBER(type)
30 IPC_STRUCT_TRAITS_MEMBER(extra_data_for_type)
31 IPC_STRUCT_TRAITS_MEMBER(href)
32 IPC_STRUCT_TRAITS_MEMBER(anchor_text)
33 IPC_STRUCT_TRAITS_MEMBER(img_src)
34 IPC_STRUCT_TRAITS_END()
36 #define IPC_MESSAGE_START AndroidWebViewMsgStart
38 //-----------------------------------------------------------------------------
39 // RenderView messages
40 // These are messages sent from the browser to the renderer process.
42 // Tells the renderer to drop all WebCore memory cache.
43 IPC_MESSAGE_CONTROL0(AwViewMsg_ClearCache)
45 // Request for the renderer to determine if the document contains any image
46 // elements. The id should be passed in the response message so the response
47 // can be associated with the request.
48 IPC_MESSAGE_ROUTED1(AwViewMsg_DocumentHasImages,
49 int /* id */)
51 // Do hit test at the given webview coordinate. "Webview" coordinates are
52 // physical pixel values with the 0,0 at the top left of the current displayed
53 // view (ie 0,0 is not the top left of the page if the page is scrolled).
54 IPC_MESSAGE_ROUTED2(AwViewMsg_DoHitTest,
55 gfx::PointF /* touch_center */,
56 gfx::SizeF /* touch_area */)
58 // Sets the zoom factor for text only. Used in layout modes other than
59 // Text Autosizing.
60 IPC_MESSAGE_ROUTED1(AwViewMsg_SetTextZoomFactor,
61 float /* zoom_factor */)
63 // Resets WebKit WebView scrolling and scale state. We need to send this
64 // message whenever we want to guarantee that page's scale will be
65 // recalculated by WebKit.
66 IPC_MESSAGE_ROUTED0(AwViewMsg_ResetScrollAndScaleState)
68 // Sets the initial page scale. This overrides initial scale set by
69 // the meta viewport tag.
70 IPC_MESSAGE_ROUTED1(AwViewMsg_SetInitialPageScale,
71 double /* page_scale_factor */)
73 // Sets the base background color for this view.
74 IPC_MESSAGE_ROUTED1(AwViewMsg_SetBackgroundColor,
75 SkColor)
77 IPC_MESSAGE_CONTROL1(AwViewMsg_SetJsOnlineProperty,
78 bool /* network_up */)
80 // Tells blink to smooth scroll to the specified location within |duration_ms|.
81 IPC_MESSAGE_ROUTED3(AwViewMsg_SmoothScroll,
82 int /* target_x */,
83 int /* target_y */,
84 long /* duration_ms */);
86 //-----------------------------------------------------------------------------
87 // RenderView messages
88 // These are messages sent from the renderer to the browser process.
90 // Response to AwViewMsg_DocumentHasImages request.
91 IPC_MESSAGE_ROUTED2(AwViewHostMsg_DocumentHasImagesResponse,
92 int, /* id */
93 bool /* has_images */)
95 // Response to AwViewMsg_DoHitTest.
96 IPC_MESSAGE_ROUTED1(AwViewHostMsg_UpdateHitTestData,
97 android_webview::AwHitTestData)
99 // Sent whenever the page scale factor (as seen by RenderView) is changed.
100 IPC_MESSAGE_ROUTED1(AwViewHostMsg_PageScaleFactorChanged,
101 float /* page_scale_factor */)
103 // Sent whenever the contents size (as seen by RenderView) is changed.
104 IPC_MESSAGE_ROUTED1(AwViewHostMsg_OnContentsSizeChanged,
105 gfx::Size /* contents_size */)
107 // Sent when a subframe is created.
108 IPC_MESSAGE_CONTROL2(AwViewHostMsg_SubFrameCreated,
109 int /* parent_render_frame_id */,
110 int /* child_render_frame_id */)