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 EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ |
6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ | 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "components/keyed_service/core/keyed_service.h" | 11 #include "components/keyed_service/core/keyed_service.h" |
12 #include "extensions/browser/api/management/management_api_delegate.h" | 12 #include "extensions/browser/api/management/management_api_delegate.h" |
13 #include "extensions/browser/browser_context_keyed_api_factory.h" | 13 #include "extensions/browser/browser_context_keyed_api_factory.h" |
14 #include "extensions/browser/event_router.h" | 14 #include "extensions/browser/event_router.h" |
| 15 #include "extensions/browser/extension_event_histogram_value.h" |
15 #include "extensions/browser/extension_function.h" | 16 #include "extensions/browser/extension_function.h" |
16 #include "extensions/browser/extension_registry_observer.h" | 17 #include "extensions/browser/extension_registry_observer.h" |
17 | 18 |
18 class ExtensionRegistry; | 19 class ExtensionRegistry; |
19 class ExtensionUninstallDialog; | 20 class ExtensionUninstallDialog; |
20 struct WebApplicationInfo; | 21 struct WebApplicationInfo; |
21 | 22 |
22 namespace extensions { | 23 namespace extensions { |
23 class ExtensionRegistry; | 24 class ExtensionRegistry; |
24 class RequirementsChecker; | 25 class RequirementsChecker; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 const Extension* extension, | 237 const Extension* extension, |
237 UnloadedExtensionInfo::Reason reason) override; | 238 UnloadedExtensionInfo::Reason reason) override; |
238 void OnExtensionInstalled(content::BrowserContext* browser_context, | 239 void OnExtensionInstalled(content::BrowserContext* browser_context, |
239 const Extension* extension, | 240 const Extension* extension, |
240 bool is_update) override; | 241 bool is_update) override; |
241 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 242 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
242 const Extension* extension, | 243 const Extension* extension, |
243 extensions::UninstallReason reason) override; | 244 extensions::UninstallReason reason) override; |
244 | 245 |
245 // Dispatches management api events to listening extensions. | 246 // Dispatches management api events to listening extensions. |
246 void BroadcastEvent(const Extension* extension, const char* event_name); | 247 void BroadcastEvent(const Extension* extension, |
| 248 events::HistogramValue histogram_value, |
| 249 const char* event_name); |
247 | 250 |
248 content::BrowserContext* browser_context_; | 251 content::BrowserContext* browser_context_; |
249 | 252 |
250 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 253 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
251 extension_registry_observer_; | 254 extension_registry_observer_; |
252 | 255 |
253 DISALLOW_COPY_AND_ASSIGN(ManagementEventRouter); | 256 DISALLOW_COPY_AND_ASSIGN(ManagementEventRouter); |
254 }; | 257 }; |
255 | 258 |
256 class ManagementAPI : public BrowserContextKeyedAPI, | 259 class ManagementAPI : public BrowserContextKeyedAPI, |
(...skipping 28 matching lines...) Expand all Loading... |
285 scoped_ptr<ManagementEventRouter> management_event_router_; | 288 scoped_ptr<ManagementEventRouter> management_event_router_; |
286 | 289 |
287 scoped_ptr<ManagementAPIDelegate> delegate_; | 290 scoped_ptr<ManagementAPIDelegate> delegate_; |
288 | 291 |
289 DISALLOW_COPY_AND_ASSIGN(ManagementAPI); | 292 DISALLOW_COPY_AND_ASSIGN(ManagementAPI); |
290 }; | 293 }; |
291 | 294 |
292 } // namespace extensions | 295 } // namespace extensions |
293 | 296 |
294 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ | 297 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ |
OLD | NEW |