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

Side by Side Diff: content/renderer/usb/web_usb_client_impl.cc

Issue 1310103002: Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "content/renderer/usb/web_usb_client_impl.h" 5 #include "content/renderer/usb/web_usb_client_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/move.h" 10 #include "base/move.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "content/child/scoped_web_callbacks.h" 12 #include "content/child/scoped_web_callbacks.h"
13 #include "content/renderer/usb/type_converters.h" 13 #include "content/renderer/usb/type_converters.h"
14 #include "content/renderer/usb/web_usb_device_impl.h" 14 #include "content/renderer/usb/web_usb_device_impl.h"
15 #include "device/devices_app/public/cpp/constants.h" 15 #include "device/devices_app/public/cpp/constants.h"
16 #include "mojo/application/public/cpp/connect.h" 16 #include "mojo/application/public/cpp/connect.h"
17 #include "mojo/application/public/interfaces/shell.mojom.h" 17 #include "mojo/application/public/interfaces/shell.mojom.h"
18 #include "third_party/WebKit/public/platform/WebCallbacks.h" 18 #include "third_party/WebKit/public/platform/WebCallbacks.h"
19 #include "third_party/WebKit/public/platform/WebPassOwnPtr.h" 19 #include "third_party/WebKit/public/platform/WebPassOwnPtr.h"
20 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceFilter.h " 20 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceFilter.h "
21 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceInfo.h" 21 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceInfo.h"
22 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceRequestO ptions.h" 22 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceRequestO ptions.h"
23 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBError.h" 23 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBError.h"
24 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" 24 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h"
25 #include "third_party/mojo/src/mojo/public/cpp/bindings/error_handler.h"
26 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" 25 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
27 26
28 namespace content { 27 namespace content {
29 28
30 namespace { 29 namespace {
31 30
32 const char kNoServiceError[] = "USB service unavailable."; 31 const char kNoServiceError[] = "USB service unavailable.";
33 32
34 // Generic default rejection handler for any WebUSB callbacks type. Assumes 33 // Generic default rejection handler for any WebUSB callbacks type. Assumes
35 // |CallbacksType| is a blink::WebCallbacks<T, const blink::WebUSBError&> 34 // |CallbacksType| is a blink::WebCallbacks<T, const blink::WebUSBError&>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 92
94 void WebUSBClientImpl::requestDevice( 93 void WebUSBClientImpl::requestDevice(
95 const blink::WebUSBDeviceRequestOptions& options, 94 const blink::WebUSBDeviceRequestOptions& options,
96 blink::WebUSBClientRequestDeviceCallbacks* callbacks) { 95 blink::WebUSBClientRequestDeviceCallbacks* callbacks) {
97 callbacks->onError(blink::WebUSBError(blink::WebUSBError::Error::Service, 96 callbacks->onError(blink::WebUSBError(blink::WebUSBError::Error::Service,
98 base::UTF8ToUTF16("Not implemented."))); 97 base::UTF8ToUTF16("Not implemented.")));
99 delete callbacks; 98 delete callbacks;
100 } 99 }
101 100
102 } // namespace content 101 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/presentation/presentation_dispatcher.h ('k') | content/renderer/usb/web_usb_device_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698