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

Unified Diff: extensions/browser/extension_host.h

Issue 933423003: Make BackgroundContentsService start up BackgroundContents with a delay, as for ExtensionHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 10 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: extensions/browser/extension_host.h
diff --git a/extensions/browser/extension_host.h b/extensions/browser/extension_host.h
index d7803cf9ec0a9d9e3b7650e9bf471dbc96991bb0..4d6aa060e3ff00df6179eb4d84af041a9c964862 100644
--- a/extensions/browser/extension_host.h
+++ b/extensions/browser/extension_host.h
@@ -17,6 +17,7 @@
#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 "extensions/browser/extension_function_dispatcher.h"
#include "extensions/common/stack_frame.h"
#include "extensions/common/view_type.h"
@@ -44,7 +45,8 @@ class WindowController;
//
// If you are adding code that only affects visible extension views (and not
// invisible background pages) you should add it to ExtensionViewHost.
-class ExtensionHost : public content::WebContentsDelegate,
+class ExtensionHost : public DelayedStartRenderHost,
+ public content::WebContentsDelegate,
public content::WebContentsObserver,
public ExtensionFunctionDispatcher::Delegate,
public content::NotificationObserver {
@@ -78,8 +80,9 @@ class ExtensionHost : public content::WebContentsDelegate,
void CreateRenderViewSoon();
// DO NOT CALL THIS. Always use CreateRenderViewSoon().
- // (Unless you're implementing an ExtensionHostQueue).
- void CreateRenderViewNow();
+ // (Unless you're implementing an ExtensionHostQueue.)
+ // DelayedStartRenderHost:
+ void CreateRenderViewNow() override;
// Closes this host (results in [possibly asynchronous] deletion).
void Close();
@@ -100,7 +103,7 @@ class ExtensionHost : public content::WebContentsDelegate,
// finished.
void OnNetworkRequestDone(uint64 request_id);
- // content::WebContentsObserver
+ // content::WebContentsObserver:
bool OnMessageReceived(const IPC::Message& message) override;
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
void RenderViewDeleted(content::RenderViewHost* render_view_host) override;
@@ -109,7 +112,7 @@ class ExtensionHost : public content::WebContentsDelegate,
void DocumentAvailableInMainFrame() override;
void DidStopLoading(content::RenderViewHost* render_view_host) override;
- // content::WebContentsDelegate
+ // content::WebContentsDelegate:
content::JavaScriptDialogManager* GetJavaScriptDialogManager(
content::WebContents* source) override;
void AddNewContents(content::WebContents* source,
@@ -128,7 +131,7 @@ class ExtensionHost : public content::WebContentsDelegate,
content::MediaStreamType type) override;
bool IsNeverVisible(content::WebContents* web_contents) override;
- // content::NotificationObserver
+ // content::NotificationObserver:
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override;

Powered by Google App Engine
This is Rietveld 408576698