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

Side by Side Diff: chrome/browser/task_manager/notification_resource_provider.h

Issue 231723006: Remove balloon notification code. The last user was the Linux GTK port but that's deleted now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync after elliot's r263101 Created 6 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_TASK_MANAGER_NOTIFICATION_RESOURCE_PROVIDER_H_
6 #define CHROME_BROWSER_TASK_MANAGER_NOTIFICATION_RESOURCE_PROVIDER_H_
7
8 #include <map>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "chrome/browser/task_manager/resource_provider.h"
13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h"
15
16 class BalloonHost;
17 class TaskManager;
18
19 namespace task_manager {
20
21 class NotificationResource;
22
23 class NotificationResourceProvider : public ResourceProvider,
24 public content::NotificationObserver {
25 public:
26 static NotificationResourceProvider* Create(TaskManager* task_manager);
27
28 // ResourceProvider interface
29 virtual Resource* GetResource(int origin_pid,
30 int child_id,
31 int route_id) OVERRIDE;
32 virtual void StartUpdating() OVERRIDE;
33 virtual void StopUpdating() OVERRIDE;
34
35 // content::NotificationObserver interface
36 virtual void Observe(int type,
37 const content::NotificationSource& source,
38 const content::NotificationDetails& details) OVERRIDE;
39
40 private:
41 explicit NotificationResourceProvider(TaskManager* task_manager);
42 virtual ~NotificationResourceProvider();
43
44 void AddToTaskManager(BalloonHost* balloon_host);
45 void RemoveFromTaskManager(BalloonHost* balloon_host);
46
47 TaskManager* task_manager_;
48
49 // Maps the actual resources (BalloonHost*) to the Task Manager resources.
50 std::map<BalloonHost*, NotificationResource*> resources_;
51
52 // A scoped container for notification registries.
53 content::NotificationRegistrar registrar_;
54
55 bool updating_;
56
57 DISALLOW_COPY_AND_ASSIGN(NotificationResourceProvider);
58 };
59
60 } // namespace task_manager
61
62 #endif // CHROME_BROWSER_TASK_MANAGER_NOTIFICATION_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/task_manager/notification_resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698