Chromium Code Reviews| Index: chrome/browser/extensions/api/api_resource_event_notifier.h |
| diff --git a/chrome/browser/extensions/api/api_resource_event_notifier.h b/chrome/browser/extensions/api/api_resource_event_notifier.h |
| index 4ef8e2ef4112fd063330d7a4dd8f6cf09be9ffd8..58426969a5b1d0513ba3a4f0e7b58479556f0429 100644 |
| --- a/chrome/browser/extensions/api/api_resource_event_notifier.h |
| +++ b/chrome/browser/extensions/api/api_resource_event_notifier.h |
| @@ -25,7 +25,8 @@ namespace extensions { |
| enum APIResourceEventType { |
| API_RESOURCE_EVENT_CONNECT_COMPLETE, |
| API_RESOURCE_EVENT_DATA_READ, |
| - API_RESOURCE_EVENT_WRITE_COMPLETE |
| + API_RESOURCE_EVENT_WRITE_COMPLETE, |
| + API_RESOURCE_EVENT_TRANSFER_COMPLETE, |
| }; |
| extern const char kSrcIdKey[]; |
| @@ -60,15 +61,19 @@ class APIResourceEventNotifier |
| virtual void OnWriteComplete(int result_code); |
| + virtual void OnTransferComplete(int result_code, base::ListValue* data); |
| + |
| static std::string APIResourceEventTypeToString( |
| APIResourceEventType event_type); |
| private: |
| - void DispatchEvent(DictionaryValue* event); |
| - void DispatchEventOnUIThread(DictionaryValue* event); |
| + void DispatchEvent(const std::string &extension, DictionaryValue* event); |
|
miket_OOO
2012/04/25 23:10:37
Placement of reference/pointers vs. whitespace (et
Garret Kelly
2012/04/26 20:13:44
Done.
asargent_no_longer_on_chrome
2012/04/26 21:21:45
nit: instead of 'extension', let's call this param
Garret Kelly
2012/04/27 00:32:34
What about event_handler? The string describes the
|
| + void DispatchEventOnUIThread(const std::string &extension, |
| + DictionaryValue* event); |
| DictionaryValue* CreateAPIResourceEvent(APIResourceEventType event_type); |
| - void SendEventWithResultCode(APIResourceEventType event_type, |
| + void SendEventWithResultCode(const std::string &extension, |
| + APIResourceEventType event_type, |
| int result_code); |
| ExtensionEventRouter* router_; |