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

Side by Side Diff: chrome/browser/automation/automation_resource_tracker.h

Issue 3412016: FBTF: Move a bunch of code to the headers and remove includes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase + fixed windows issues locally Created 10 years, 3 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
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_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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 template <class T> 26 template <class T>
27 struct AutomationResourceTraits<T*> { 27 struct AutomationResourceTraits<T*> {
28 typedef T ValueType; 28 typedef T ValueType;
29 }; 29 };
30 30
31 // This class exists for the sole purpose of allowing some of the implementation 31 // This class exists for the sole purpose of allowing some of the implementation
32 // of AutomationResourceTracker to live in a .cc file. 32 // of AutomationResourceTracker to live in a .cc file.
33 class AutomationResourceTrackerImpl { 33 class AutomationResourceTrackerImpl {
34 public: 34 public:
35 explicit AutomationResourceTrackerImpl(IPC::Message::Sender* sender) 35 explicit AutomationResourceTrackerImpl(IPC::Message::Sender* sender);
36 : sender_(sender) {} 36 virtual ~AutomationResourceTrackerImpl();
37
38 virtual ~AutomationResourceTrackerImpl() {}
39 37
40 // These need to be implemented in AutomationResourceTracker, 38 // These need to be implemented in AutomationResourceTracker,
41 // since it needs to call the subclass's type-specific notification 39 // since it needs to call the subclass's type-specific notification
42 // registration functions. 40 // registration functions.
43 virtual void AddObserverTypeProxy(void* resource) = 0; 41 virtual void AddObserverTypeProxy(void* resource) = 0;
44 virtual void RemoveObserverTypeProxy(void* resource) = 0; 42 virtual void RemoveObserverTypeProxy(void* resource) = 0;
45 43
46 int AddImpl(void* resource); 44 int AddImpl(void* resource);
47 void RemoveImpl(void* resource); 45 void RemoveImpl(void* resource);
48 int GenerateHandle(); 46 int GenerateHandle();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 AddObserver(static_cast<T>(resource)); 148 AddObserver(static_cast<T>(resource));
151 } 149 }
152 virtual void RemoveObserverTypeProxy(void* resource) { 150 virtual void RemoveObserverTypeProxy(void* resource) {
153 RemoveObserver(static_cast<T>(resource)); 151 RemoveObserver(static_cast<T>(resource));
154 } 152 }
155 153
156 DISALLOW_COPY_AND_ASSIGN(AutomationResourceTracker); 154 DISALLOW_COPY_AND_ASSIGN(AutomationResourceTracker);
157 }; 155 };
158 156
159 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__ 157 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_RESOURCE_TRACKER_H__
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/automation/automation_resource_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698