OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // provisionally-created RenderView (if it exists) in the renderer | 311 // provisionally-created RenderView (if it exists) in the renderer |
312 // process will be destroyed, UNLESS the delegate, during this method, | 312 // process will be destroyed, UNLESS the delegate, during this method, |
313 // itself creates a WebContents using |source_site_instance|, | 313 // itself creates a WebContents using |source_site_instance|, |
314 // |route_id|, |main_frame_route_id|, and |main_frame_widget_route_id| | 314 // |route_id|, |main_frame_route_id|, and |main_frame_widget_route_id| |
315 // as creation parameters. If this happens, the delegate assumes | 315 // as creation parameters. If this happens, the delegate assumes |
316 // ownership of the corresponding RenderView, etc. |web_contents| will | 316 // ownership of the corresponding RenderView, etc. |web_contents| will |
317 // detect that this has happened by looking for the existence of a | 317 // detect that this has happened by looking for the existence of a |
318 // RenderViewHost in |source_site_instance| with |route_id|. | 318 // RenderViewHost in |source_site_instance| with |route_id|. |
319 virtual bool ShouldCreateWebContents( | 319 virtual bool ShouldCreateWebContents( |
320 WebContents* web_contents, | 320 WebContents* web_contents, |
| 321 RenderFrameHost* opener, |
321 SiteInstance* source_site_instance, | 322 SiteInstance* source_site_instance, |
322 int32_t route_id, | 323 int32_t route_id, |
323 int32_t main_frame_route_id, | 324 int32_t main_frame_route_id, |
324 int32_t main_frame_widget_route_id, | 325 int32_t main_frame_widget_route_id, |
325 content::mojom::WindowContainerType window_container_type, | 326 content::mojom::WindowContainerType window_container_type, |
326 const GURL& opener_url, | 327 const GURL& opener_url, |
327 const std::string& frame_name, | 328 const std::string& frame_name, |
328 const GURL& target_url, | 329 const GURL& target_url, |
329 const std::string& partition_id, | 330 const std::string& partition_id, |
330 SessionStorageNamespace* session_storage_namespace); | 331 SessionStorageNamespace* session_storage_namespace); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 // Called when |this| is no longer the WebContentsDelegate for |source|. | 576 // Called when |this| is no longer the WebContentsDelegate for |source|. |
576 void Detach(WebContents* source); | 577 void Detach(WebContents* source); |
577 | 578 |
578 // The WebContents that this is currently a delegate for. | 579 // The WebContents that this is currently a delegate for. |
579 std::set<WebContents*> attached_contents_; | 580 std::set<WebContents*> attached_contents_; |
580 }; | 581 }; |
581 | 582 |
582 } // namespace content | 583 } // namespace content |
583 | 584 |
584 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 585 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |