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

Unified Diff: chrome/browser/extensions/api/api_resource_event_notifier.h

Issue 10224009: Experimental USB API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
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..8707ed44315ac3f99b2ea5c4aaba161746ea29e1 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);
+ 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_;

Powered by Google App Engine
This is Rietveld 408576698