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

Unified Diff: chrome/browser/extensions/api/usb/usb_api.h

Issue 10777003: Refactor APIResourceController to ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge/antony/fix build. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/socket/udp_socket.cc ('k') | chrome/browser/extensions/api/usb/usb_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/usb/usb_api.h
diff --git a/chrome/browser/extensions/api/usb/usb_api.h b/chrome/browser/extensions/api/usb/usb_api.h
index 30f3400f33551a2cefa0a4793e192bc1805e133a..9b46bd32bc93ae37a5e1f36b6d8f2e344beeb95c 100644
--- a/chrome/browser/extensions/api/usb/usb_api.h
+++ b/chrome/browser/extensions/api/usb/usb_api.h
@@ -8,13 +8,27 @@
#include <string>
#include "chrome/browser/extensions/api/api_function.h"
+#include "chrome/browser/extensions/api/api_resource_manager.h"
#include "chrome/common/extensions/api/experimental_usb.h"
namespace extensions {
-class APIResourceEventNotifier;
+class ApiResourceEventNotifier;
+class UsbDeviceResource;
-class UsbFindDeviceFunction : public AsyncAPIFunction {
+class UsbAsyncApiFunction : public AsyncApiFunction {
+ public:
+ UsbAsyncApiFunction();
+
+ protected:
+ virtual ~UsbAsyncApiFunction();
+
+ virtual bool PrePrepare() OVERRIDE;
+
+ ApiResourceManager<UsbDeviceResource>* manager_;
+};
+
+class UsbFindDeviceFunction : public UsbAsyncApiFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.usb.findDevice");
@@ -28,10 +42,10 @@ class UsbFindDeviceFunction : public AsyncAPIFunction {
private:
scoped_ptr<extensions::api::experimental_usb::FindDevice::Params> parameters_;
- APIResourceEventNotifier* event_notifier_;
+ ApiResourceEventNotifier* event_notifier_;
};
-class UsbCloseDeviceFunction : public AsyncAPIFunction {
+class UsbCloseDeviceFunction : public UsbAsyncApiFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.usb.closeDevice");
@@ -48,7 +62,7 @@ class UsbCloseDeviceFunction : public AsyncAPIFunction {
parameters_;
};
-class UsbControlTransferFunction : public AsyncAPIFunction {
+class UsbControlTransferFunction : public UsbAsyncApiFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.usb.controlTransfer");
@@ -65,7 +79,7 @@ class UsbControlTransferFunction : public AsyncAPIFunction {
parameters_;
};
-class UsbBulkTransferFunction : public AsyncAPIFunction {
+class UsbBulkTransferFunction : public UsbAsyncApiFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.usb.bulkTransfer");
@@ -82,7 +96,7 @@ class UsbBulkTransferFunction : public AsyncAPIFunction {
parameters_;
};
-class UsbInterruptTransferFunction : public AsyncAPIFunction {
+class UsbInterruptTransferFunction : public UsbAsyncApiFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.usb.interruptTransfer");
@@ -99,7 +113,7 @@ class UsbInterruptTransferFunction : public AsyncAPIFunction {
parameters_;
};
-class UsbIsochronousTransferFunction : public AsyncAPIFunction {
+class UsbIsochronousTransferFunction : public UsbAsyncApiFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.usb.isochronousTransfer");
« no previous file with comments | « chrome/browser/extensions/api/socket/udp_socket.cc ('k') | chrome/browser/extensions/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698