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

Unified Diff: extensions/browser/process_manager.h

Issue 1096313003: Create interface "EventPageTracker" for checking an extension's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix IWYU linter error while I'm at it. Created 5 years, 8 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
« no previous file with comments | « extensions/browser/event_page_tracker.h ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager.h
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
index de23f1ec0dcf36aaa3aeca6a9d08702d7c476a3f..2b7b64fb7c1f248ff29fe4fc10bcdcc1fa386b30 100644
--- a/extensions/browser/process_manager.h
+++ b/extensions/browser/process_manager.h
@@ -17,6 +17,7 @@
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/event_page_tracker.h"
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/common/extension.h"
#include "extensions/common/view_type.h"
@@ -43,7 +44,8 @@ class ProcessManagerObserver;
// track of split-mode extensions only.
class ProcessManager : public KeyedService,
public content::NotificationObserver,
- public ExtensionRegistryObserver {
+ public ExtensionRegistryObserver,
+ public EventPageTracker {
public:
using ExtensionHostSet = std::set<extensions::ExtensionHost*>;
@@ -145,6 +147,11 @@ class ProcessManager : public KeyedService,
void SetKeepaliveImpulseDecrementCallbackForTesting(
const ImpulseCallbackForTesting& callback);
+ // EventPageTracker implementation.
+ bool IsEventPageSuspended(const std::string& extension_id) override;
+ bool WakeEventPage(const std::string& extension_id,
+ const base::Callback<void(bool)>& callback) override;
+
// Sets the time in milliseconds that an extension event page can
// be idle before it is shut down; must be > 0.
static void SetEventPageIdleTimeForTesting(unsigned idle_time_msec);
« no previous file with comments | « extensions/browser/event_page_tracker.h ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698