| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CONTENTS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_BACKGROUND_CONTENTS_SERVICE_H_ |
| 6 #define CHROME_BROWSER_BACKGROUND_CONTENTS_SERVICE_H_ | 6 #define CHROME_BROWSER_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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 private: | 77 private: |
| 78 friend class BackgroundContentsServiceTest; | 78 friend class BackgroundContentsServiceTest; |
| 79 friend class MockBackgroundContents; | 79 friend class MockBackgroundContents; |
| 80 friend class TaskManagerBrowserTest; | 80 friend class TaskManagerBrowserTest; |
| 81 FRIEND_TEST_ALL_PREFIXES(BackgroundContentsServiceTest, | 81 FRIEND_TEST_ALL_PREFIXES(BackgroundContentsServiceTest, |
| 82 BackgroundContentsCreateDestroy); | 82 BackgroundContentsCreateDestroy); |
| 83 FRIEND_TEST_ALL_PREFIXES(BackgroundContentsServiceTest, | 83 FRIEND_TEST_ALL_PREFIXES(BackgroundContentsServiceTest, |
| 84 TestApplicationIDLinkage); | 84 TestApplicationIDLinkage); |
| 85 FRIEND_TEST_ALL_PREFIXES(TaskManagerBrowserTest, | 85 FRIEND_TEST_ALL_PREFIXES(TaskManagerBrowserTest, |
| 86 NoticeBGContentsChanges); | 86 NoticeBGContentsChanges); |
| 87 FRIEND_TEST_ALL_PREFIXES(TaskManagerBrowserTest, |
| 88 KillBGContents); |
| 87 | 89 |
| 88 // Registers for various notifications. | 90 // Registers for various notifications. |
| 89 void StartObserving(Profile* profile); | 91 void StartObserving(Profile* profile); |
| 90 | 92 |
| 91 // NotificationObserver implementation. | 93 // NotificationObserver implementation. |
| 92 virtual void Observe(NotificationType type, | 94 virtual void Observe(NotificationType type, |
| 93 const NotificationSource& source, | 95 const NotificationSource& source, |
| 94 const NotificationDetails& details); | 96 const NotificationDetails& details); |
| 95 | 97 |
| 96 // Loads all registered BackgroundContents at startup. | 98 // Loads all registered BackgroundContents at startup. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // applications. | 145 // applications. |
| 144 // Key: application id | 146 // Key: application id |
| 145 // Value: BackgroundContentsInfo for the BC associated with that application | 147 // Value: BackgroundContentsInfo for the BC associated with that application |
| 146 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; | 148 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; |
| 147 BackgroundContentsMap contents_map_; | 149 BackgroundContentsMap contents_map_; |
| 148 | 150 |
| 149 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); | 151 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 #endif // CHROME_BROWSER_BACKGROUND_CONTENTS_SERVICE_H_ | 154 #endif // CHROME_BROWSER_BACKGROUND_CONTENTS_SERVICE_H_ |
| OLD | NEW |