OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // Called by |frame| to notify that it has received an update on focused | 239 // Called by |frame| to notify that it has received an update on focused |
240 // element. |bounds_in_root_view| is the rectangle containing the element that | 240 // element. |bounds_in_root_view| is the rectangle containing the element that |
241 // is focused and is with respect to root frame's RenderWidgetHost's | 241 // is focused and is with respect to root frame's RenderWidgetHost's |
242 // coordinate space. | 242 // coordinate space. |
243 virtual void OnFocusedElementChangedInFrame( | 243 virtual void OnFocusedElementChangedInFrame( |
244 RenderFrameHostImpl* frame, | 244 RenderFrameHostImpl* frame, |
245 const gfx::Rect& bounds_in_root_view) {} | 245 const gfx::Rect& bounds_in_root_view) {} |
246 | 246 |
247 // The page is trying to open a new page (e.g. a popup window). The window | 247 // The page is trying to open a new page (e.g. a popup window). The window |
248 // should be created associated with the given |main_frame_widget_route_id| in | 248 // should be created associated with the given |main_frame_widget_route_id| in |
249 // the process of |source_site_instance|, but it should not be shown yet. That | 249 // the process of |opener|, but it should not be shown yet. That should happen |
250 // should happen in response to ShowCreatedWindow. | 250 // in response to ShowCreatedWindow. |params.window_container_type| describes |
251 // |params.window_container_type| describes the type of RenderViewHost | 251 // the type of RenderViewHost container that is requested -- in particular, |
252 // container that is requested -- in particular, the window.open call may have | 252 // the window.open call may have specified 'background' and 'persistent' in |
253 // specified 'background' and 'persistent' in the feature string. | 253 // the feature string. |
| 254 // |
| 255 // The passed |opener| is the RenderFrameHost initiating the window creation. |
| 256 // It will never be null, even if the opener is suppressed via |params|. |
254 // | 257 // |
255 // The passed |params.frame_name| parameter is the name parameter that was | 258 // The passed |params.frame_name| parameter is the name parameter that was |
256 // passed to window.open(), and will be empty if none was passed. | 259 // passed to window.open(), and will be empty if none was passed. |
257 // | 260 // |
258 // Note: this is not called "CreateWindow" because that will clash with | 261 // Note: this is not called "CreateWindow" because that will clash with |
259 // the Windows function which is actually a #define. | 262 // the Windows function which is actually a #define. |
260 // | 263 // |
261 // The caller is expected to handle cleanup if this operation fails or is | 264 // The caller is expected to handle cleanup if this operation fails or is |
262 // suppressed, by looking for the existence of a RenderFrameHost in | 265 // suppressed, by looking for the existence of a RenderFrameHost in |
263 // source_site_instance's process with |main_frame_route_id| after this method | 266 // |opener|'s process with |main_frame_route_id| after this method returns. |
264 // returns. | |
265 virtual void CreateNewWindow( | 267 virtual void CreateNewWindow( |
266 SiteInstance* source_site_instance, | 268 RenderFrameHost* opener, |
267 int32_t render_view_route_id, | 269 int32_t render_view_route_id, |
268 int32_t main_frame_route_id, | 270 int32_t main_frame_route_id, |
269 int32_t main_frame_widget_route_id, | 271 int32_t main_frame_widget_route_id, |
270 const mojom::CreateNewWindowParams& params, | 272 const mojom::CreateNewWindowParams& params, |
271 SessionStorageNamespace* session_storage_namespace) {} | 273 SessionStorageNamespace* session_storage_namespace) {} |
272 | 274 |
273 // Show a previously created page with the specified disposition and bounds. | 275 // Show a previously created page with the specified disposition and bounds. |
274 // The window is identified by the |main_frame_widget_route_id| passed to | 276 // The window is identified by the |main_frame_widget_route_id| passed to |
275 // CreateNewWindow. | 277 // CreateNewWindow. |
276 // | 278 // |
(...skipping 25 matching lines...) Expand all Loading... |
302 GetJavaRenderFrameHostDelegate(); | 304 GetJavaRenderFrameHostDelegate(); |
303 #endif | 305 #endif |
304 | 306 |
305 protected: | 307 protected: |
306 virtual ~RenderFrameHostDelegate() {} | 308 virtual ~RenderFrameHostDelegate() {} |
307 }; | 309 }; |
308 | 310 |
309 } // namespace content | 311 } // namespace content |
310 | 312 |
311 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 313 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
OLD | NEW |