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

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

Issue 10134008: Add bind(), recvFrom(), sendTo() for UDP socket. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update 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.cc
diff --git a/chrome/browser/extensions/api/api_resource_event_notifier.cc b/chrome/browser/extensions/api/api_resource_event_notifier.cc
index 6b090239e6406c9a3b2309c263aadb82d814d772..000ace5797e34814f29af6d7b06c22920b84a90c 100644
--- a/chrome/browser/extensions/api/api_resource_event_notifier.cc
+++ b/chrome/browser/extensions/api/api_resource_event_notifier.cc
@@ -31,6 +31,8 @@ const char kIsFinalEventKey[] = "isFinalEvent";
const char kResultCodeKey[] = "resultCode";
const char kDataKey[] = "data";
+const char kAddressKey[] = "address";
+const char kPortKey[] = "port";
APIResourceEventNotifier::APIResourceEventNotifier(
ExtensionEventRouter* router,
@@ -51,7 +53,9 @@ void APIResourceEventNotifier::OnConnectComplete(int result_code) {
}
void APIResourceEventNotifier::OnDataRead(int result_code,
- base::ListValue* data) {
+ base::ListValue* data,
+ const std::string& address,
+ int port) {
// Do we have a destination for this event? There will be one if a source id
// was injected by the request handler for the resource's create method in
// schema_generated_bindings.js, which will in turn be the case if the caller
@@ -65,6 +69,8 @@ void APIResourceEventNotifier::OnDataRead(int result_code,
API_RESOURCE_EVENT_DATA_READ);
event->SetInteger(kResultCodeKey, result_code);
event->Set(kDataKey, data);
+ event->SetString(kAddressKey, address);
+ event->SetInteger(kPortKey, port);
DispatchEvent(event);
}
« no previous file with comments | « chrome/browser/extensions/api/api_resource_event_notifier.h ('k') | chrome/browser/extensions/api/socket/socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698