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

Unified Diff: apps/app_lifetime_monitor.h

Issue 2729503007: Remove Profile usage from //apps (Closed)
Patch Set: deps Created 3 years, 9 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 | « apps/DEPS ('k') | apps/app_lifetime_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_lifetime_monitor.h
diff --git a/apps/app_lifetime_monitor.h b/apps/app_lifetime_monitor.h
index 7fe1ef5b528effe74ce61557abbd90ae96db1ee3..a0b54f6f1e0d2af46db56ce52aed261e3df8e52b 100644
--- a/apps/app_lifetime_monitor.h
+++ b/apps/app_lifetime_monitor.h
@@ -14,7 +14,9 @@
#include "content/public/browser/notification_registrar.h"
#include "extensions/browser/app_window/app_window_registry.h"
-class Profile;
+namespace content {
+class BrowserContext;
+}
namespace apps {
@@ -27,22 +29,25 @@ class AppLifetimeMonitor : public KeyedService,
class Observer {
public:
// Called when the app starts running.
- virtual void OnAppStart(Profile* profile, const std::string& app_id) {}
+ virtual void OnAppStart(content::BrowserContext* context,
+ const std::string& app_id) {}
// Called when the app becomes active to the user, i.e. the first window
// becomes visible.
- virtual void OnAppActivated(Profile* profile, const std::string& app_id) {}
+ virtual void OnAppActivated(content::BrowserContext* context,
+ const std::string& app_id) {}
// Called when the app becomes inactive to the user, i.e. the last window is
// hidden or closed.
- virtual void OnAppDeactivated(Profile* profile, const std::string& app_id) {
- }
+ virtual void OnAppDeactivated(content::BrowserContext* context,
+ const std::string& app_id) {}
// Called when the app stops running.
- virtual void OnAppStop(Profile* profile, const std::string& app_id) {}
+ virtual void OnAppStop(content::BrowserContext* context,
+ const std::string& app_id) {}
protected:
virtual ~Observer() {}
};
- explicit AppLifetimeMonitor(Profile* profile);
+ explicit AppLifetimeMonitor(content::BrowserContext* context);
~AppLifetimeMonitor() override;
void AddObserver(Observer* observer);
@@ -71,7 +76,7 @@ class AppLifetimeMonitor : public KeyedService,
void NotifyAppStop(const std::string& app_id);
content::NotificationRegistrar registrar_;
- Profile* profile_;
+ content::BrowserContext* context_;
base::ObserverList<Observer> observers_;
DISALLOW_COPY_AND_ASSIGN(AppLifetimeMonitor);
« no previous file with comments | « apps/DEPS ('k') | apps/app_lifetime_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698