#ifndef CHROME_BROWSER_USB_USB_CONTEXT_H_
#define CHROME_BROWSER_USB_USB_CONTEXT_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
struct libusb_context;
typedef libusb_context* PlatformUsbContext;
class UsbContext : public base::RefCountedThreadSafe<UsbContext> {
public:
PlatformUsbContext context() const { return context_; }
protected:
friend class UsbService;
friend class base::RefCountedThreadSafe<UsbContext>;
explicit UsbContext(PlatformUsbContext context);
virtual ~UsbContext();
private:
class UsbEventHandler;
PlatformUsbContext context_;
UsbEventHandler* event_handler_;
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(UsbContext);
};
#endif