Index: chrome/browser/background/background_contents.h |
diff --git a/chrome/browser/background/background_contents.h b/chrome/browser/background/background_contents.h |
index e7345e344c7c6572da0f1e721f105d6c3e941742..8b2815b1e70463cad3874f72eae8da8863f483a8 100644 |
--- a/chrome/browser/background/background_contents.h |
+++ b/chrome/browser/background/background_contents.h |
@@ -12,7 +12,9 @@ |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/web_contents_delegate.h" |
#include "content/public/browser/web_contents_observer.h" |
+#include "extensions/browser/delayed_start_render_host.h" |
#include "ui/base/window_open_disposition.h" |
+#include "url/gurl.h" |
class Profile; |
@@ -24,7 +26,8 @@ class SiteInstance; |
// This class maintains a WebContents used in the background. It can host a |
// renderer, but does not have any visible display. |
// TODO(atwilson): Unify this with background pages; http://crbug.com/77790 |
-class BackgroundContents : public content::WebContentsDelegate, |
+class BackgroundContents : public extensions::DelayedStartRenderHost, |
+ public content::WebContentsDelegate, |
public content::WebContentsObserver, |
public content::NotificationObserver { |
public: |
@@ -56,6 +59,12 @@ class BackgroundContents : public content::WebContentsDelegate, |
content::WebContents* web_contents() const { return web_contents_.get(); } |
virtual const GURL& GetURL() const; |
+ // Adds this BackgroundContents to the queue of RenderViews to create. |
+ void CreateRenderViewSoon(const GURL& url); |
+ |
+ // DelayedStartRenderHost implementation: |
+ void CreateRenderViewNow() override; |
Devlin
2015/02/18 23:22:12
We can actually make this private now (same for ex
Yoyo Zhou
2015/02/19 02:55:37
Cool, I didn't know you could do that.
Devlin
2015/02/19 16:41:43
Handy for these implementation-detail-type interfa
|
+ |
// content::WebContentsDelegate implementation: |
void CloseContents(content::WebContents* source) override; |
bool ShouldSuppressDialogs(content::WebContents* source) override; |
@@ -88,6 +97,9 @@ class BackgroundContents : public content::WebContentsDelegate, |
scoped_ptr<content::WebContents> web_contents_; |
content::NotificationRegistrar registrar_; |
+ // The initial URL to load. |
+ GURL initial_url_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BackgroundContents); |
}; |