Update ownership semantics for WebContentsDelegate::AddWebContents.
This CL is a refactor and has no intended behavior change.
This CL updates AddWebContents to use explicit ownership semantics. This CL
fixes some of the subclasses to have proper ownership semantics, and leaves
behind some TODOs for other subclasses.
Bug: 832879, 674318
Change-Id: I6294e591e9166dfb0c029eb78648c17216075dab
TBR: [email protected], [email protected], [email protected]
Reviewed-on: https://chromium-review.googlesource.com/1028631
Reviewed-by: Richard Coles <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: Ken Rockot <[email protected]>
Commit-Queue: Erik Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#554450}
diff --git a/extensions/browser/extension_host.h b/extensions/browser/extension_host.h
index c93e3a4..8c7a96fd 100644
--- a/extensions/browser/extension_host.h
+++ b/extensions/browser/extension_host.h
@@ -113,7 +113,7 @@
content::JavaScriptDialogManager* GetJavaScriptDialogManager(
content::WebContents* source) override;
void AddNewContents(content::WebContents* source,
- content::WebContents* new_contents,
+ std::unique_ptr<content::WebContents> new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,