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

Side by Side Diff: content/public/browser/web_contents.h

Issue 2439273002: Clean up ownership in WebUI creation. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <set> 11 #include <set>
11 12
12 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
13 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
14 #include "base/process/kill.h" 15 #include "base/process/kill.h"
15 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
16 #include "base/supports_user_data.h" 17 #include "base/supports_user_data.h"
17 #include "build/build_config.h" 18 #include "build/build_config.h"
18 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
19 #include "content/public/browser/invalidate_type.h" 20 #include "content/public/browser/invalidate_type.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 287
287 // Returns the theme color for the underlying content as set by the 288 // Returns the theme color for the underlying content as set by the
288 // theme-color meta tag. 289 // theme-color meta tag.
289 virtual SkColor GetThemeColor() const = 0; 290 virtual SkColor GetThemeColor() const = 0;
290 291
291 // Create a WebUI page for the given url. In most cases, this doesn't need to 292 // Create a WebUI page for the given url. In most cases, this doesn't need to
292 // be called by embedders since content will create its own WebUI objects as 293 // be called by embedders since content will create its own WebUI objects as
293 // necessary. However if the embedder wants to create its own WebUI object and 294 // necessary. However if the embedder wants to create its own WebUI object and
294 // keep track of it manually, it can use this. |frame_name| is used to 295 // keep track of it manually, it can use this. |frame_name| is used to
295 // identify the frame and cannot be empty. 296 // identify the frame and cannot be empty.
296 virtual WebUI* CreateSubframeWebUI(const GURL& url, 297 virtual std::unique_ptr<WebUI> CreateSubframeWebUI(
297 const std::string& frame_name) = 0; 298 const GURL& url,
299 const std::string& frame_name) = 0;
298 300
299 // Returns the committed WebUI if one exists, otherwise the pending one. 301 // Returns the committed WebUI if one exists, otherwise the pending one.
300 virtual WebUI* GetWebUI() const = 0; 302 virtual WebUI* GetWebUI() const = 0;
301 virtual WebUI* GetCommittedWebUI() const = 0; 303 virtual WebUI* GetCommittedWebUI() const = 0;
302 304
303 // Allows overriding the user agent used for NavigationEntries it owns. 305 // Allows overriding the user agent used for NavigationEntries it owns.
304 virtual void SetUserAgentOverride(const std::string& override) = 0; 306 virtual void SetUserAgentOverride(const std::string& override) = 0;
305 virtual const std::string& GetUserAgentOverride() const = 0; 307 virtual const std::string& GetUserAgentOverride() const = 0;
306 308
307 // Enable the accessibility tree for this WebContents in the renderer, 309 // Enable the accessibility tree for this WebContents in the renderer,
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 758
757 private: 759 private:
758 // This interface should only be implemented inside content. 760 // This interface should only be implemented inside content.
759 friend class WebContentsImpl; 761 friend class WebContentsImpl;
760 WebContents() {} 762 WebContents() {}
761 }; 763 };
762 764
763 } // namespace content 765 } // namespace content
764 766
765 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 767 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW
« 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