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

Side by Side Diff: extensions/browser/api/hid/hid_api.h

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_API_HID_HID_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_HID_HID_API_H_
6 #define EXTENSIONS_BROWSER_API_HID_HID_API_H_ 6 #define EXTENSIONS_BROWSER_API_HID_HID_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 ~HidReceiveFunction() override; 133 ~HidReceiveFunction() override;
134 134
135 // HidConnectionIoFunction: 135 // HidConnectionIoFunction:
136 bool ValidateParameters() override; 136 bool ValidateParameters() override;
137 void StartWork(device::HidConnection* connection) override; 137 void StartWork(device::HidConnection* connection) override;
138 138
139 void OnFinished(bool success, 139 void OnFinished(bool success,
140 scoped_refptr<net::IOBuffer> buffer, 140 scoped_refptr<net::IOBuffer> buffer,
141 size_t size); 141 size_t size);
142 142
143 scoped_ptr<core_api::hid::Receive::Params> parameters_; 143 scoped_ptr<api::hid::Receive::Params> parameters_;
144 144
145 DISALLOW_COPY_AND_ASSIGN(HidReceiveFunction); 145 DISALLOW_COPY_AND_ASSIGN(HidReceiveFunction);
146 }; 146 };
147 147
148 class HidSendFunction : public HidConnectionIoFunction { 148 class HidSendFunction : public HidConnectionIoFunction {
149 public: 149 public:
150 DECLARE_EXTENSION_FUNCTION("hid.send", HID_SEND); 150 DECLARE_EXTENSION_FUNCTION("hid.send", HID_SEND);
151 151
152 HidSendFunction(); 152 HidSendFunction();
153 153
154 private: 154 private:
155 ~HidSendFunction() override; 155 ~HidSendFunction() override;
156 156
157 // HidConnectionIoFunction: 157 // HidConnectionIoFunction:
158 bool ValidateParameters() override; 158 bool ValidateParameters() override;
159 void StartWork(device::HidConnection* connection) override; 159 void StartWork(device::HidConnection* connection) override;
160 160
161 void OnFinished(bool success); 161 void OnFinished(bool success);
162 162
163 scoped_ptr<core_api::hid::Send::Params> parameters_; 163 scoped_ptr<api::hid::Send::Params> parameters_;
164 164
165 DISALLOW_COPY_AND_ASSIGN(HidSendFunction); 165 DISALLOW_COPY_AND_ASSIGN(HidSendFunction);
166 }; 166 };
167 167
168 class HidReceiveFeatureReportFunction : public HidConnectionIoFunction { 168 class HidReceiveFeatureReportFunction : public HidConnectionIoFunction {
169 public: 169 public:
170 DECLARE_EXTENSION_FUNCTION("hid.receiveFeatureReport", 170 DECLARE_EXTENSION_FUNCTION("hid.receiveFeatureReport",
171 HID_RECEIVEFEATUREREPORT); 171 HID_RECEIVEFEATUREREPORT);
172 172
173 HidReceiveFeatureReportFunction(); 173 HidReceiveFeatureReportFunction();
174 174
175 private: 175 private:
176 ~HidReceiveFeatureReportFunction() override; 176 ~HidReceiveFeatureReportFunction() override;
177 177
178 // HidConnectionIoFunction: 178 // HidConnectionIoFunction:
179 bool ValidateParameters() override; 179 bool ValidateParameters() override;
180 void StartWork(device::HidConnection* connection) override; 180 void StartWork(device::HidConnection* connection) override;
181 181
182 void OnFinished(bool success, 182 void OnFinished(bool success,
183 scoped_refptr<net::IOBuffer> buffer, 183 scoped_refptr<net::IOBuffer> buffer,
184 size_t size); 184 size_t size);
185 185
186 scoped_ptr<core_api::hid::ReceiveFeatureReport::Params> parameters_; 186 scoped_ptr<api::hid::ReceiveFeatureReport::Params> parameters_;
187 187
188 DISALLOW_COPY_AND_ASSIGN(HidReceiveFeatureReportFunction); 188 DISALLOW_COPY_AND_ASSIGN(HidReceiveFeatureReportFunction);
189 }; 189 };
190 190
191 class HidSendFeatureReportFunction : public HidConnectionIoFunction { 191 class HidSendFeatureReportFunction : public HidConnectionIoFunction {
192 public: 192 public:
193 DECLARE_EXTENSION_FUNCTION("hid.sendFeatureReport", HID_SENDFEATUREREPORT); 193 DECLARE_EXTENSION_FUNCTION("hid.sendFeatureReport", HID_SENDFEATUREREPORT);
194 194
195 HidSendFeatureReportFunction(); 195 HidSendFeatureReportFunction();
196 196
197 private: 197 private:
198 ~HidSendFeatureReportFunction() override; 198 ~HidSendFeatureReportFunction() override;
199 199
200 // HidConnectionIoFunction: 200 // HidConnectionIoFunction:
201 bool ValidateParameters() override; 201 bool ValidateParameters() override;
202 void StartWork(device::HidConnection* connection) override; 202 void StartWork(device::HidConnection* connection) override;
203 203
204 void OnFinished(bool success); 204 void OnFinished(bool success);
205 205
206 scoped_ptr<core_api::hid::SendFeatureReport::Params> parameters_; 206 scoped_ptr<api::hid::SendFeatureReport::Params> parameters_;
207 207
208 DISALLOW_COPY_AND_ASSIGN(HidSendFeatureReportFunction); 208 DISALLOW_COPY_AND_ASSIGN(HidSendFeatureReportFunction);
209 }; 209 };
210 210
211 } // namespace extensions 211 } // namespace extensions
212 212
213 #endif // EXTENSIONS_BROWSER_API_HID_HID_API_H_ 213 #endif // EXTENSIONS_BROWSER_API_HID_HID_API_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/guest_view/web_view/web_view_internal_api.cc ('k') | extensions/browser/api/hid/hid_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698