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

Unified Diff: extensions/browser/api/hid/hid_api.h

Issue 499713002: Don't pass buffers to HidConnection::Read because it knows the size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed rockot@'s nits. Created 6 years, 4 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
« no previous file with comments | « device/hid/hid_connection_win.cc ('k') | extensions/browser/api/hid/hid_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/hid/hid_api.h
diff --git a/extensions/browser/api/hid/hid_api.h b/extensions/browser/api/hid/hid_api.h
index 6a8808f97f65a2be8541a31e62d995601bdd9f68..7683a63a55c034c2863df04f0cdd91eaea171ef1 100644
--- a/extensions/browser/api/hid/hid_api.h
+++ b/extensions/browser/api/hid/hid_api.h
@@ -112,10 +112,10 @@ class HidReceiveFunction : public HidAsyncApiFunction {
private:
virtual ~HidReceiveFunction();
- void OnFinished(bool success, size_t bytes);
+ void OnFinished(bool success,
+ scoped_refptr<net::IOBuffer> buffer,
+ size_t size);
- bool has_report_id_;
- scoped_refptr<net::IOBufferWithSize> buffer_;
scoped_ptr<core_api::hid::Receive::Params> parameters_;
DISALLOW_COPY_AND_ASSIGN(HidReceiveFunction);
@@ -134,7 +134,7 @@ class HidSendFunction : public HidAsyncApiFunction {
private:
virtual ~HidSendFunction();
- void OnFinished(bool success, size_t bytes);
+ void OnFinished(bool success);
scoped_ptr<core_api::hid::Send::Params> parameters_;
@@ -155,9 +155,10 @@ class HidReceiveFeatureReportFunction : public HidAsyncApiFunction {
private:
virtual ~HidReceiveFeatureReportFunction();
- void OnFinished(bool success, size_t bytes);
+ void OnFinished(bool success,
+ scoped_refptr<net::IOBuffer> buffer,
+ size_t size);
- scoped_refptr<net::IOBufferWithSize> buffer_;
scoped_ptr<core_api::hid::ReceiveFeatureReport::Params> parameters_;
DISALLOW_COPY_AND_ASSIGN(HidReceiveFeatureReportFunction);
@@ -176,7 +177,7 @@ class HidSendFeatureReportFunction : public HidAsyncApiFunction {
private:
virtual ~HidSendFeatureReportFunction();
- void OnFinished(bool success, size_t bytes);
+ void OnFinished(bool success);
scoped_ptr<core_api::hid::SendFeatureReport::Params> parameters_;
« no previous file with comments | « device/hid/hid_connection_win.cc ('k') | extensions/browser/api/hid/hid_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698