| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
| 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 TestApplicationIDLinkage); | 98 TestApplicationIDLinkage); |
| 99 FRIEND_TEST_ALL_PREFIXES(TaskManagerBrowserTest, | 99 FRIEND_TEST_ALL_PREFIXES(TaskManagerBrowserTest, |
| 100 NoticeBGContentsChanges); | 100 NoticeBGContentsChanges); |
| 101 FRIEND_TEST_ALL_PREFIXES(TaskManagerBrowserTest, | 101 FRIEND_TEST_ALL_PREFIXES(TaskManagerBrowserTest, |
| 102 KillBGContents); | 102 KillBGContents); |
| 103 | 103 |
| 104 // Registers for various notifications. | 104 // Registers for various notifications. |
| 105 void StartObserving(Profile* profile); | 105 void StartObserving(Profile* profile); |
| 106 | 106 |
| 107 // NotificationObserver implementation. | 107 // NotificationObserver implementation. |
| 108 virtual void Observe(NotificationType type, | 108 virtual void Observe(int type, |
| 109 const NotificationSource& source, | 109 const NotificationSource& source, |
| 110 const NotificationDetails& details); | 110 const NotificationDetails& details); |
| 111 | 111 |
| 112 // Loads all registered BackgroundContents at startup. | 112 // Loads all registered BackgroundContents at startup. |
| 113 void LoadBackgroundContentsFromPrefs(Profile* profile); | 113 void LoadBackgroundContentsFromPrefs(Profile* profile); |
| 114 | 114 |
| 115 // Load a BackgroundContent; the settings are read from the provided | 115 // Load a BackgroundContent; the settings are read from the provided |
| 116 // dictionary. | 116 // dictionary. |
| 117 void LoadBackgroundContentsFromDictionary(Profile* profile, | 117 void LoadBackgroundContentsFromDictionary(Profile* profile, |
| 118 const std::string& extension_id, | 118 const std::string& extension_id, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // applications. | 169 // applications. |
| 170 // Key: application id | 170 // Key: application id |
| 171 // Value: BackgroundContentsInfo for the BC associated with that application | 171 // Value: BackgroundContentsInfo for the BC associated with that application |
| 172 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; | 172 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; |
| 173 BackgroundContentsMap contents_map_; | 173 BackgroundContentsMap contents_map_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); | 175 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 178 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
| OLD | NEW |