Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: content/public/browser/web_contents.h

Issue 2439273002: Clean up ownership in WebUI creation. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents.h
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 7eaa25270321d1547375d50b2941abfcbeccec81..6edb0ac5b823f7a23798204f80d43503115dbe25 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <set>
#include "base/callback_forward.h"
@@ -293,8 +294,9 @@ class WebContents : public PageNavigator,
// necessary. However if the embedder wants to create its own WebUI object and
// keep track of it manually, it can use this. |frame_name| is used to
// identify the frame and cannot be empty.
- virtual WebUI* CreateSubframeWebUI(const GURL& url,
- const std::string& frame_name) = 0;
+ virtual std::unique_ptr<WebUI> CreateSubframeWebUI(
+ const GURL& url,
+ const std::string& frame_name) = 0;
// Returns the committed WebUI if one exists, otherwise the pending one.
virtual WebUI* GetWebUI() const = 0;
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698