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

Unified Diff: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc

Issue 10868072: Make TabContents ctor private; poke hole for existing callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all green Created 8 years, 4 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
Index: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
diff --git a/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc b/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
index e8b2f9f600c772055b91f37685229f5df6db05ce..835076252229743590e4ce7aa38d1a428399dcb4 100644
--- a/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
+++ b/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
@@ -52,6 +52,14 @@ namespace keys = extensions::offscreen_tabs_constants;
namespace tabs_keys = extensions::tabs_constants;
namespace events = extensions::event_names;
+// TODO(avi): Kill this when TabContents goes away.
+class OffscreenTabContentsCreator {
+ public:
+ static TabContents* CreateTabContents(content::WebContents* contents) {
+ return TabContents::Factory::CreateTabContents(contents);
+ }
+};
+
namespace {
class ParentTab;
@@ -228,7 +236,8 @@ void OffscreenTab::Init(const GURL& url,
// Create the offscreen tab.
WebContents* web_contents = WebContents::Create(
profile, NULL, MSG_ROUTING_NONE, NULL);
- tab_contents_.reset(new TabContents(web_contents));
+ tab_contents_.reset(
+ OffscreenTabContentsCreator::CreateTabContents(web_contents));
// Setting the size starts the renderer.
SetSize(width, height);
« no previous file with comments | « chrome/browser/extensions/api/identity/web_auth_flow.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698