| Index: chrome/browser/extensions/system_info_event_router.h
|
| diff --git a/chrome/browser/extensions/system_info_event_router.h b/chrome/browser/extensions/system_info_event_router.h
|
| index a6e22a930f9bf03f91c77a55c10d241b41496f85..2fd8b4f1afd5d7ebbaa4b35a95d4b58e65850c47 100644
|
| --- a/chrome/browser/extensions/system_info_event_router.h
|
| +++ b/chrome/browser/extensions/system_info_event_router.h
|
| @@ -13,6 +13,16 @@
|
|
|
| namespace extensions {
|
|
|
| +namespace api {
|
| +
|
| +namespace experimental_system_info_cpu {
|
| +
|
| +struct CpuUpdateInfo;
|
| +
|
| +} // namespace experimental_system_info_cpu
|
| +
|
| +} // namespace api
|
| +
|
| // Event router for systemInfo API. It is a singleton instance shared by
|
| // multiple profiles.
|
| // TODO(hongbo): It should derive from SystemMonitor::DevicesChangedObserver.
|
| @@ -46,11 +56,15 @@ class SystemInfoEventRouter {
|
| SystemInfoEventRouter();
|
| virtual ~SystemInfoEventRouter();
|
|
|
| - // Called on the UI thread to dispatch the systemInfo event to all extension
|
| + // Called from any thread to dispatch the systemInfo event to all extension
|
| // processes cross multiple profiles.
|
| void DispatchEvent(const std::string& event_name,
|
| scoped_ptr<base::ListValue> args);
|
|
|
| + // The callback for CPU sampling cycle. Called from FILE thread.
|
| + void OnNextCpuSampling(
|
| + scoped_ptr<api::experimental_system_info_cpu::CpuUpdateInfo> info);
|
| +
|
| // Used to record the event names being watched.
|
| std::multiset<std::string> watching_event_set_;
|
|
|
|
|