• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 // IPC messages for interacting with frames.
6 // Multiply-included message file, hence no include guard.
7 
8 #include "content/common/content_export.h"
9 #include "content/public/common/common_param_traits.h"
10 #include "ipc/ipc_message_macros.h"
11 
12 #undef IPC_MESSAGE_EXPORT
13 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
14 
15 #define IPC_MESSAGE_START FrameMsgStart
16 
17 // Sent by the renderer when a child frame is created in the renderer. The
18 // |parent_frame_id| and |frame_id| are NOT routing ids. They are
19 // renderer-allocated identifiers used for tracking a frame's creation.
20 //
21 // Each of these messages will have a corresponding FrameHostMsg_Detach message
22 // sent when the frame is detached from the DOM.
23 //
24 // TOOD(ajwong): replace parent_render_frame_id and frame_id with just the
25 // routing ids.
26 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame,
27                             int32 /* parent_render_frame_id */,
28                             int64 /* parent_frame_id */,
29                             int64 /* frame_id */,
30                             std::string /* frame_name */,
31                             int /* new_render_frame_id */)
32 
33 // Sent by the renderer to the parent RenderFrameHost when a child frame is
34 // detached from the DOM.
35 IPC_MESSAGE_ROUTED2(FrameHostMsg_Detach,
36                     int64 /* parent_frame_id */,
37                     int64 /* frame_id */)
38 
39 // Sent when the renderer starts a provisional load for a frame.
40 IPC_MESSAGE_ROUTED4(FrameHostMsg_DidStartProvisionalLoadForFrame,
41                     int64 /* frame_id */,
42                     int64 /* parent_frame_id */,
43                     bool /* true if it is the main frame */,
44                     GURL /* url */)
45 
46 // Sent to the browser when the renderer detects it is blocked on a pepper
47 // plugin message for too long. This is also sent when it becomes unhung
48 // (according to the value of is_hung). The browser can give the user the
49 // option of killing the plugin.
50 IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung,
51                     int /* plugin_child_id */,
52                     base::FilePath /* path */,
53                     bool /* is_hung */)
54 
55 // Sent by the renderer process to indicate that a plugin instance has crashed.
56 // Note: |plugin_pid| should not be trusted. The corresponding process has
57 // probably died. Moreover, the ID may have been reused by a new process. Any
58 // usage other than displaying it in a prompt to the user is very likely to be
59 // wrong.
60 IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed,
61                     base::FilePath /* plugin_path */,
62                     base::ProcessId /* plugin_pid */)
63 
64 // Return information about a plugin for the given URL and MIME
65 // type. If there is no matching plugin, |found| is false.
66 // |actual_mime_type| is the actual mime type supported by the
67 // found plugin.
68 IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
69                             int /* render_frame_id */,
70                             GURL /* url */,
71                             GURL /* page_url */,
72                             std::string /* mime_type */,
73                             bool /* found */,
74                             content::WebPluginInfo /* plugin info */,
75                             std::string /* actual_mime_type */)
76 
77 // A renderer sends this to the browser process when it wants to
78 // create a plugin.  The browser will create the plugin process if
79 // necessary, and will return a handle to the channel on success.
80 // On error an empty string is returned.
81 IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin,
82                             int /* render_frame_id */,
83                             GURL /* url */,
84                             GURL /* page_url */,
85                             std::string /* mime_type */,
86                             IPC::ChannelHandle /* channel_handle */,
87                             content::WebPluginInfo /* info */)
88