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

Side by Side Diff: chrome/browser/background_contents_service.h

Issue 6226002: Blow away BackgroundContents when RenderView goes away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Removed queueing code in unit test Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/tab_contents/background_contents.h » ('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 (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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/background_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698