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); | |
89 | 87 |
90 // Registers for various notifications. | 88 // Registers for various notifications. |
91 void StartObserving(Profile* profile); | 89 void StartObserving(Profile* profile); |
92 | 90 |
93 // NotificationObserver implementation. | 91 // NotificationObserver implementation. |
94 virtual void Observe(NotificationType type, | 92 virtual void Observe(NotificationType type, |
95 const NotificationSource& source, | 93 const NotificationSource& source, |
96 const NotificationDetails& details); | 94 const NotificationDetails& details); |
97 | 95 |
98 // Loads all registered BackgroundContents at startup. | 96 // Loads all registered BackgroundContents at startup. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // applications. | 143 // applications. |
146 // Key: application id | 144 // Key: application id |
147 // Value: BackgroundContentsInfo for the BC associated with that application | 145 // Value: BackgroundContentsInfo for the BC associated with that application |
148 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; | 146 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; |
149 BackgroundContentsMap contents_map_; | 147 BackgroundContentsMap contents_map_; |
150 | 148 |
151 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); | 149 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); |
152 }; | 150 }; |
153 | 151 |
154 #endif // CHROME_BROWSER_BACKGROUND_CONTENTS_SERVICE_H_ | 152 #endif // CHROME_BROWSER_BACKGROUND_CONTENTS_SERVICE_H_ |
OLD | NEW |