OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__ | 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__ |
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__ | 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "chrome/common/ipc_message.h" | |
12 #include "chrome/common/notification_observer.h" | 11 #include "chrome/common/notification_observer.h" |
13 #include "chrome/common/notification_registrar.h" | 12 #include "chrome/common/notification_registrar.h" |
14 #include "chrome/common/notification_type.h" | 13 #include "chrome/common/notification_type.h" |
| 14 #include "ipc/ipc_message.h" |
15 | 15 |
16 template <class T> class Source; | 16 template <class T> class Source; |
17 | 17 |
18 // Template trick so that AutomationResourceTracker can be used with non-pointer | 18 // Template trick so that AutomationResourceTracker can be used with non-pointer |
19 // types. | 19 // types. |
20 template <class T> | 20 template <class T> |
21 struct AutomationResourceTraits { | 21 struct AutomationResourceTraits { |
22 typedef T ValueType; | 22 typedef T ValueType; |
23 }; | 23 }; |
24 | 24 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 AddObserver(static_cast<T>(resource)); | 141 AddObserver(static_cast<T>(resource)); |
142 } | 142 } |
143 virtual void RemoveObserverTypeProxy(void* resource) { | 143 virtual void RemoveObserverTypeProxy(void* resource) { |
144 RemoveObserver(static_cast<T>(resource)); | 144 RemoveObserver(static_cast<T>(resource)); |
145 } | 145 } |
146 | 146 |
147 DISALLOW_COPY_AND_ASSIGN(AutomationResourceTracker); | 147 DISALLOW_COPY_AND_ASSIGN(AutomationResourceTracker); |
148 }; | 148 }; |
149 | 149 |
150 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__ | 150 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__ |
OLD | NEW |