OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_API_PROCESSES_PROCESSES_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PROCESSES_PROCESSES_API_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_API_PROCESSES_PROCESSES_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PROCESSES_PROCESSES_API_H__ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 DISALLOW_COPY_AND_ASSIGN(ProcessesEventRouter); | 91 DISALLOW_COPY_AND_ASSIGN(ProcessesEventRouter); |
92 }; | 92 }; |
93 | 93 |
94 // The profile-keyed service that manages the processes extension API. | 94 // The profile-keyed service that manages the processes extension API. |
95 class ProcessesAPI : public ProfileKeyedAPI, | 95 class ProcessesAPI : public ProfileKeyedAPI, |
96 public EventRouter::Observer { | 96 public EventRouter::Observer { |
97 public: | 97 public: |
98 explicit ProcessesAPI(Profile* profile); | 98 explicit ProcessesAPI(Profile* profile); |
99 virtual ~ProcessesAPI(); | 99 virtual ~ProcessesAPI(); |
100 | 100 |
101 // ProfileKeyedService implementation. | 101 // BrowserContextKeyedService implementation. |
102 virtual void Shutdown() OVERRIDE; | 102 virtual void Shutdown() OVERRIDE; |
103 | 103 |
104 // ProfileKeyedAPI implementation. | 104 // ProfileKeyedAPI implementation. |
105 static ProfileKeyedAPIFactory<ProcessesAPI>* GetFactoryInstance(); | 105 static ProfileKeyedAPIFactory<ProcessesAPI>* GetFactoryInstance(); |
106 | 106 |
107 // Convenience method to get the ProcessesAPI for a profile. | 107 // Convenience method to get the ProcessesAPI for a profile. |
108 static ProcessesAPI* Get(Profile* profile); | 108 static ProcessesAPI* Get(Profile* profile); |
109 | 109 |
110 ProcessesEventRouter* processes_event_router(); | 110 ProcessesEventRouter* processes_event_router(); |
111 | 111 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 bool memory_; | 212 bool memory_; |
213 #endif | 213 #endif |
214 | 214 |
215 DECLARE_EXTENSION_FUNCTION("experimental.processes.getProcessInfo", | 215 DECLARE_EXTENSION_FUNCTION("experimental.processes.getProcessInfo", |
216 EXPERIMENTAL_PROCESSES_GETPROCESSINFO) | 216 EXPERIMENTAL_PROCESSES_GETPROCESSINFO) |
217 }; | 217 }; |
218 | 218 |
219 } // namespace extensions | 219 } // namespace extensions |
220 | 220 |
221 #endif // CHROME_BROWSER_EXTENSIONS_API_PROCESSES_PROCESSES_API_H__ | 221 #endif // CHROME_BROWSER_EXTENSIONS_API_PROCESSES_PROCESSES_API_H__ |
OLD | NEW |