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

Side by Side Diff: chrome/browser/extensions/chrome_process_manager_delegate.h

Issue 2149953002: Enable login screen apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stefan feedback 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_process_manager_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_PROCESS_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_PROCESS_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_PROCESS_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_PROCESS_MANAGER_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 11 #include "content/public/browser/notification_registrar.h"
12 #include "extensions/browser/process_manager_delegate.h" 12 #include "extensions/browser/process_manager_delegate.h"
13 13
14 class Browser; 14 class Browser;
15 class Profile; 15 class Profile;
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 // Support for ProcessManager. Controls cases where Chrome wishes to disallow 19 // Support for ProcessManager. Controls cases where Chrome wishes to disallow
20 // extension background pages or defer their creation. 20 // extension background pages or defer their creation.
21 class ChromeProcessManagerDelegate : public ProcessManagerDelegate, 21 class ChromeProcessManagerDelegate : public ProcessManagerDelegate,
22 public content::NotificationObserver { 22 public content::NotificationObserver {
23 public: 23 public:
24 ChromeProcessManagerDelegate(); 24 ChromeProcessManagerDelegate();
25 ~ChromeProcessManagerDelegate() override; 25 ~ChromeProcessManagerDelegate() override;
26 26
27 // ProcessManagerDelegate implementation: 27 // ProcessManagerDelegate implementation:
28 bool IsBackgroundPageAllowed(content::BrowserContext* context) const override; 28 bool AreBackgroundPagesAllowedForContext(
29 content::BrowserContext* context) const override;
30 bool IsExtensionBackgroundPageAllowed(
31 content::BrowserContext* context,
32 const Extension& extension) const override;
29 bool DeferCreatingStartupBackgroundHosts( 33 bool DeferCreatingStartupBackgroundHosts(
30 content::BrowserContext* context) const override; 34 content::BrowserContext* context) const override;
31 35
32 // content::NotificationObserver implementation: 36 // content::NotificationObserver implementation:
33 void Observe(int type, 37 void Observe(int type,
34 const content::NotificationSource& source, 38 const content::NotificationSource& source,
35 const content::NotificationDetails& details) override; 39 const content::NotificationDetails& details) override;
36 40
37 private: 41 private:
38 // Notification handlers. 42 // Notification handlers.
39 void OnBrowserWindowReady(Browser* browser); 43 void OnBrowserWindowReady(Browser* browser);
40 void OnProfileCreated(Profile* profile); 44 void OnProfileCreated(Profile* profile);
41 void OnProfileDestroyed(Profile* profile); 45 void OnProfileDestroyed(Profile* profile);
42 46
43 content::NotificationRegistrar registrar_; 47 content::NotificationRegistrar registrar_;
44 48
45 DISALLOW_COPY_AND_ASSIGN(ChromeProcessManagerDelegate); 49 DISALLOW_COPY_AND_ASSIGN(ChromeProcessManagerDelegate);
46 }; 50 };
47 51
48 } // namespace extensions 52 } // namespace extensions
49 53
50 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_PROCESS_MANAGER_DELEGATE_H_ 54 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_PROCESS_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_process_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698