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

Unified Diff: content/renderer/usb/web_usb_device_impl.h

Issue 1850023002: Consume Mojo services directly in Blink's WebUSB implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't do assignments in if statements. Created 4 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
« no previous file with comments | « content/renderer/usb/web_usb_client_impl.cc ('k') | content/renderer/usb/web_usb_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/usb/web_usb_device_impl.h
diff --git a/content/renderer/usb/web_usb_device_impl.h b/content/renderer/usb/web_usb_device_impl.h
deleted file mode 100644
index 677a93650ce218fd0bfcf3e9b2b5c2e2a366af91..0000000000000000000000000000000000000000
--- a/content/renderer/usb/web_usb_device_impl.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_RENDERER_USB_WEB_USB_DEVICE_IMPL_H_
-#define CONTENT_RENDERER_USB_WEB_USB_DEVICE_IMPL_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "device/usb/public/interfaces/device.mojom.h"
-#include "device/usb/public/interfaces/device_manager.mojom.h"
-#include "services/shell/public/interfaces/interface_provider.mojom.h"
-#include "third_party/WebKit/public/platform/modules/webusb/WebUSBDevice.h"
-#include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceInfo.h"
-#include "third_party/WebKit/public/platform/modules/webusb/WebUSBError.h"
-
-namespace mojo {
-class Shell;
-}
-
-namespace content {
-
-class WebUSBDeviceImpl : public blink::WebUSBDevice {
- public:
- WebUSBDeviceImpl(device::usb::DevicePtr device,
- const blink::WebUSBDeviceInfo& device_info);
- ~WebUSBDeviceImpl() override;
-
- private:
- // blink::WebUSBDevice implementation:
- const blink::WebUSBDeviceInfo& info() const override;
- void open(blink::WebUSBDeviceOpenCallbacks* callbacks) override;
- void close(blink::WebUSBDeviceCloseCallbacks* callbacks) override;
- void setConfiguration(
- uint8_t configuration_value,
- blink::WebUSBDeviceSetConfigurationCallbacks* callbacks) override;
- void claimInterface(
- uint8_t interface_number,
- blink::WebUSBDeviceClaimInterfaceCallbacks* callbacks) override;
- void releaseInterface(
- uint8_t interface_number,
- blink::WebUSBDeviceReleaseInterfaceCallbacks* callbacks) override;
- void setInterface(uint8_t interface_number,
- uint8_t alternate_setting,
- blink::WebUSBDeviceSetInterfaceAlternateSettingCallbacks*
- callbacks) override;
- void clearHalt(uint8_t endpoint_number,
- blink::WebUSBDeviceClearHaltCallbacks* callbacks) override;
- void controlTransfer(
- const blink::WebUSBDevice::ControlTransferParameters& parameters,
- uint8_t* data,
- size_t data_size,
- unsigned int timeout,
- blink::WebUSBDeviceTransferCallbacks* callbacks) override;
- void transfer(blink::WebUSBDevice::TransferDirection direction,
- uint8_t endpoint_number,
- uint8_t* data,
- size_t data_size,
- unsigned int timeout,
- blink::WebUSBDeviceTransferCallbacks* callbacks) override;
- void isochronousTransfer(
- blink::WebUSBDevice::TransferDirection direction,
- uint8_t endpoint_number,
- uint8_t* data,
- size_t data_size,
- blink::WebVector<uint32_t> packet_lengths,
- unsigned int timeout,
- blink::WebUSBDeviceTransferCallbacks* callbacks) override;
- void reset(blink::WebUSBDeviceResetCallbacks* callbacks) override;
-
- device::usb::DevicePtr device_;
- blink::WebUSBDeviceInfo device_info_;
-
- base::WeakPtrFactory<WebUSBDeviceImpl> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(WebUSBDeviceImpl);
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_USB_WEB_USB_DEVICE_IMPL_H_
« no previous file with comments | « content/renderer/usb/web_usb_client_impl.cc ('k') | content/renderer/usb/web_usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698