IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / common / frame_messages.h
blob776775d20575a0fc79c4778d20a40a8d6a7b577d
1 // Copyright 2013 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 // IPC messages for interacting with frames.
6 // Multiply-included message file, hence no include guard.
8 #include "content/common/content_export.h"
9 #include "content/common/frame_param.h"
10 #include "content/public/common/common_param_traits.h"
11 #include "ipc/ipc_message_macros.h"
12 #include "url/gurl.h"
14 #undef IPC_MESSAGE_EXPORT
15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
17 #define IPC_MESSAGE_START FrameMsgStart
19 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params)
20 // The frame ID for the failure report.
21 IPC_STRUCT_MEMBER(int64, frame_id)
22 // The WebFrame's uniqueName().
23 IPC_STRUCT_MEMBER(base::string16, frame_unique_name)
24 // True if this is the top-most frame.
25 IPC_STRUCT_MEMBER(bool, is_main_frame)
26 // Error code as reported in the DidFailProvisionalLoad callback.
27 IPC_STRUCT_MEMBER(int, error_code)
28 // An error message generated from the error_code. This can be an empty
29 // string if we were unable to find a meaningful description.
30 IPC_STRUCT_MEMBER(base::string16, error_description)
31 // The URL that the error is reported for.
32 IPC_STRUCT_MEMBER(GURL, url)
33 // True if the failure is the result of navigating to a POST again
34 // and we're going to show the POST interstitial.
35 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial)
36 IPC_STRUCT_END()
38 // -----------------------------------------------------------------------------
39 // Messages sent from the browser to the renderer.
41 // When HW accelerated buffers are swapped in an out-of-process child frame
42 // renderer, the message is forwarded to the embedding frame to notify it of
43 // a new texture available for compositing. When the buffer has finished
44 // presenting, a FrameHostMsg_BuffersSwappedACK should be sent back to
45 // gpu host that produced this buffer.
47 // This is used in the non-ubercomp HW accelerated compositing path.
48 IPC_MESSAGE_ROUTED1(FrameMsg_BuffersSwapped,
49 FrameMsg_BuffersSwapped_Params /* params */)
51 // Notifies the embedding frame that a new CompositorFrame is ready to be
52 // presented. When the frame finishes presenting, a matching
53 // FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
54 // RenderViewHost that was produced the CompositorFrame.
56 // This is used in the ubercomp compositing path.
57 IPC_MESSAGE_ROUTED1(FrameMsg_CompositorFrameSwapped,
58 FrameMsg_CompositorFrameSwapped_Params /* params */)
60 // -----------------------------------------------------------------------------
61 // Messages sent from the renderer to the browser.
63 // Sent by the renderer when a child frame is created in the renderer. The
64 // |parent_frame_id| and |frame_id| are NOT routing ids. They are
65 // renderer-allocated identifiers used for tracking a frame's creation.
67 // Each of these messages will have a corresponding FrameHostMsg_Detach message
68 // sent when the frame is detached from the DOM.
70 // TOOD(ajwong): replace parent_render_frame_id and frame_id with just the
71 // routing ids.
72 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame,
73 int32 /* parent_render_frame_id */,
74 int64 /* parent_frame_id */,
75 int64 /* frame_id */,
76 std::string /* frame_name */,
77 int /* new_render_frame_id */)
79 // Sent by the renderer to the parent RenderFrameHost when a child frame is
80 // detached from the DOM.
81 IPC_MESSAGE_ROUTED2(FrameHostMsg_Detach,
82 int64 /* parent_frame_id */,
83 int64 /* frame_id */)
85 // Sent when the renderer starts a provisional load for a frame.
86 IPC_MESSAGE_ROUTED4(FrameHostMsg_DidStartProvisionalLoadForFrame,
87 int64 /* frame_id */,
88 int64 /* parent_frame_id */,
89 bool /* true if it is the main frame */,
90 GURL /* url */)
92 // Sent when the renderer fails a provisional load with an error.
93 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFailProvisionalLoadWithError,
94 FrameHostMsg_DidFailProvisionalLoadWithError_Params)
96 // Sent to the browser when the renderer detects it is blocked on a pepper
97 // plugin message for too long. This is also sent when it becomes unhung
98 // (according to the value of is_hung). The browser can give the user the
99 // option of killing the plugin.
100 IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung,
101 int /* plugin_child_id */,
102 base::FilePath /* path */,
103 bool /* is_hung */)
105 // Sent by the renderer process to indicate that a plugin instance has crashed.
106 // Note: |plugin_pid| should not be trusted. The corresponding process has
107 // probably died. Moreover, the ID may have been reused by a new process. Any
108 // usage other than displaying it in a prompt to the user is very likely to be
109 // wrong.
110 IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed,
111 base::FilePath /* plugin_path */,
112 base::ProcessId /* plugin_pid */)
114 // Return information about a plugin for the given URL and MIME
115 // type. If there is no matching plugin, |found| is false.
116 // |actual_mime_type| is the actual mime type supported by the
117 // found plugin.
118 IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
119 int /* render_frame_id */,
120 GURL /* url */,
121 GURL /* page_url */,
122 std::string /* mime_type */,
123 bool /* found */,
124 content::WebPluginInfo /* plugin info */,
125 std::string /* actual_mime_type */)
127 // A renderer sends this to the browser process when it wants to
128 // create a plugin. The browser will create the plugin process if
129 // necessary, and will return a handle to the channel on success.
130 // On error an empty string is returned.
131 IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin,
132 int /* render_frame_id */,
133 GURL /* url */,
134 GURL /* page_url */,
135 std::string /* mime_type */,
136 IPC::ChannelHandle /* channel_handle */,
137 content::WebPluginInfo /* info */)
139 // Acknowledge that we presented a HW buffer and provide a sync point
140 // to specify the location in the command stream when the compositor
141 // is no longer using it.
143 // See FrameMsg_BuffersSwapped.
144 IPC_MESSAGE_ROUTED1(FrameHostMsg_BuffersSwappedACK,
145 FrameHostMsg_BuffersSwappedACK_Params /* params */)
147 // Acknowledge that we presented an ubercomp frame.
149 // See FrameMsg_CompositorFrameSwapped
150 IPC_MESSAGE_ROUTED1(FrameHostMsg_CompositorFrameSwappedACK,
151 FrameHostMsg_CompositorFrameSwappedACK_Params /* params */)
153 // Indicates that the current frame has swapped out, after a SwapOut message.
154 IPC_MESSAGE_ROUTED0(FrameHostMsg_SwapOut_ACK)
156 // Instructs the frame to swap out for a cross-site transition, including
157 // running the unload event handler. Expects a SwapOut_ACK message when
158 // finished.
159 IPC_MESSAGE_ROUTED0(FrameMsg_SwapOut)