summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/browser/extensions_browser_client.h11
-rw-r--r--extensions/browser/lazy_background_task_queue_unittest.cc2
-rw-r--r--extensions/common/switches.cc8
-rw-r--r--extensions/common/switches.h2
4 files changed, 21 insertions, 2 deletions
diff --git a/extensions/browser/extensions_browser_client.h b/extensions/browser/extensions_browser_client.h
index 4810836..dd78811 100644
--- a/extensions/browser/extensions_browser_client.h
+++ b/extensions/browser/extensions_browser_client.h
@@ -29,7 +29,7 @@ class ExtensionsBrowserClient {
virtual bool IsSameContext(content::BrowserContext* first,
content::BrowserContext* second) = 0;
- // Returns true if |context| has an off-the-record content associated with it.
+ // Returns true if |context| has an off-the-record context associated with it.
virtual bool HasOffTheRecordContext(content::BrowserContext* context) = 0;
// Returns the off-the-record context associated with |context|. If |context|
@@ -39,6 +39,15 @@ class ExtensionsBrowserClient {
virtual content::BrowserContext* GetOffTheRecordContext(
content::BrowserContext* context) = 0;
+ // Return the original "recording" context. This method returns |context| if
+ // |context| is not incognito.
+ virtual content::BrowserContext* GetOriginalContext(
+ content::BrowserContext* context) = 0;
+
+ // Returns true if loading background pages should be deferred.
+ virtual bool DeferLoadingBackgroundHosts(
+ content::BrowserContext* context) const = 0;
+
// Returns the single instance of |this|.
static ExtensionsBrowserClient* Get();
diff --git a/extensions/browser/lazy_background_task_queue_unittest.cc b/extensions/browser/lazy_background_task_queue_unittest.cc
index 27d8471..da2e5bc 100644
--- a/extensions/browser/lazy_background_task_queue_unittest.cc
+++ b/extensions/browser/lazy_background_task_queue_unittest.cc
@@ -21,7 +21,7 @@ namespace extensions {
class TestExtensionProcessManager : public ExtensionProcessManager {
public:
explicit TestExtensionProcessManager(Profile* profile)
- : ExtensionProcessManager(profile),
+ : ExtensionProcessManager(profile, profile->GetOriginalProfile()),
create_count_(0) {}
virtual ~TestExtensionProcessManager() {}
diff --git a/extensions/common/switches.cc b/extensions/common/switches.cc
index 3c8ab10..674bb03 100644
--- a/extensions/common/switches.cc
+++ b/extensions/common/switches.cc
@@ -26,6 +26,14 @@ const char kEnableExperimentalExtensionApis[] =
// them in the chrome:extensions page.
const char kErrorConsole[] = "error-console";
+// The time in seconds that an extension event page can be idle before it
+// is shut down.
+const char kEventPageIdleTime[] = "event-page-idle-time";
+
+// The time in seconds that an extension event page has between being notified
+// of its impending unload and that unload happening.
+const char kEventPageSuspendingTime[] = "event-page-unloading-time";
+
// Enables extensions running scripts on chrome:// URLs.
// Extensions still need to explicitly request access to chrome:// URLs in the
// manifest.
diff --git a/extensions/common/switches.h b/extensions/common/switches.h
index 43cc0f1..e6ff310 100644
--- a/extensions/common/switches.h
+++ b/extensions/common/switches.h
@@ -15,6 +15,8 @@ extern const char kAllowLegacyExtensionManifests[];
extern const char kAllowScriptingGallery[];
extern const char kEnableExperimentalExtensionApis[];
extern const char kErrorConsole[];
+extern const char kEventPageIdleTime[];
+extern const char kEventPageSuspendingTime[];
extern const char kExtensionsOnChromeURLs[];
extern const char kShowComponentExtensionOptions[];