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

Unified Diff: chrome/browser/extensions/platform_app_service.h

Issue 11117011: Keep browser process alive while there are platform apps with background pages running. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use ProfileDependencyManager to create PlatformAppService Created 8 years, 2 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: chrome/browser/extensions/platform_app_service.h
diff --git a/chrome/browser/extensions/platform_app_service.h b/chrome/browser/extensions/platform_app_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..28a578dcc8686a69a4d1691acfc2a3b396365a46
--- /dev/null
+++ b/chrome/browser/extensions/platform_app_service.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_SERVICE_H_
+#define CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_SERVICE_H_
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_keyed_service.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+
+namespace extensions {
+
+// The PlatformAppService provides services for platform apps, such as
+// keeping the browser process alive while they are running.
+// TODO(benwells): Merge functionality of ShellWindowRegistry into this class.
+class PlatformAppService : public ProfileKeyedService,
+ public content::NotificationObserver {
+ public:
+ explicit PlatformAppService(Profile* profile);
+ virtual ~PlatformAppService();
+
+ private:
+ // content::NotificationObserver:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ content::NotificationRegistrar registrar_;
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698