OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_TASK_MANAGER_TAB_CONTENTS_RESOURCE_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TAB_CONTENTS_RESOURCE_PROVIDER_H_ |
6 #define CHROME_BROWSER_TASK_MANAGER_TAB_CONTENTS_RESOURCE_PROVIDER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_TAB_CONTENTS_RESOURCE_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // content::NotificationObserver method: | 40 // content::NotificationObserver method: |
41 virtual void Observe(int type, | 41 virtual void Observe(int type, |
42 const content::NotificationSource& source, | 42 const content::NotificationSource& source, |
43 const content::NotificationDetails& details) OVERRIDE; | 43 const content::NotificationDetails& details) OVERRIDE; |
44 | 44 |
45 private: | 45 private: |
46 virtual ~TabContentsResourceProvider(); | 46 virtual ~TabContentsResourceProvider(); |
47 | 47 |
48 void Add(content::WebContents* web_contents); | 48 void Add(content::WebContents* web_contents); |
49 void Remove(content::WebContents* web_contents); | 49 void Remove(content::WebContents* web_contents); |
50 void InstantCommitted(content::WebContents* web_contents); | |
51 | 50 |
52 void AddToTaskManager(content::WebContents* web_contents); | 51 void AddToTaskManager(content::WebContents* web_contents); |
53 | 52 |
54 // Whether we are currently reporting to the task manager. Used to ignore | 53 // Whether we are currently reporting to the task manager. Used to ignore |
55 // notifications sent after StopUpdating(). | 54 // notifications sent after StopUpdating(). |
56 bool updating_; | 55 bool updating_; |
57 | 56 |
58 TaskManager* task_manager_; | 57 TaskManager* task_manager_; |
59 | 58 |
60 // Maps the actual resources (the WebContentses) to the Task Manager | 59 // Maps the actual resources (the WebContentses) to the Task Manager |
61 // resources. | 60 // resources. |
62 std::map<content::WebContents*, TabContentsResource*> resources_; | 61 std::map<content::WebContents*, TabContentsResource*> resources_; |
63 | 62 |
64 // A scoped container for notification registries. | 63 // A scoped container for notification registries. |
65 content::NotificationRegistrar registrar_; | 64 content::NotificationRegistrar registrar_; |
66 | 65 |
67 DISALLOW_COPY_AND_ASSIGN(TabContentsResourceProvider); | 66 DISALLOW_COPY_AND_ASSIGN(TabContentsResourceProvider); |
68 }; | 67 }; |
69 | 68 |
70 } // namespace task_manager | 69 } // namespace task_manager |
71 | 70 |
72 #endif // CHROME_BROWSER_TASK_MANAGER_TAB_CONTENTS_RESOURCE_PROVIDER_H_ | 71 #endif // CHROME_BROWSER_TASK_MANAGER_TAB_CONTENTS_RESOURCE_PROVIDER_H_ |
OLD | NEW |