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

Side by Side Diff: chromeos/dbus/permission_broker_client.h

Issue 462753002: Add usb_service::UsbDeviceFilter class for device matching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add UsbDevice::RequestUsbAccess to the mock (and fix spelling). Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_
6 #define CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_ 6 #define CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "chromeos/chromeos_export.h" 12 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_client.h" 13 #include "chromeos/dbus/dbus_client.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // PermissionBrokerClient is used to communicate with the permission broker, a 17 // PermissionBrokerClient is used to communicate with the permission broker, a
18 // process that allows requesting permission to access specific device nodes. 18 // process that allows requesting permission to access specific device nodes.
19 // For example, one place that this client is used is within the USB extension 19 // For example, one place that this client is used is within the USB extension
20 // API code, where it is used to request explicit access to USB peripherals 20 // API code, where it is used to request explicit access to USB peripherals
21 // which the user the browser runs under normally wouldn't have access to. For 21 // which the user the browser runs under normally wouldn't have access to. For
22 // more details on the permission broker see: 22 // more details on the permission broker see:
23 // http://git.chromium.org/gitweb/?p=chromiumos/platform/permission_broker.git 23 // http://git.chromium.org/gitweb/?p=chromiumos/platform/permission_broker.git
24 class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient { 24 class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient {
25 public: 25 public:
26 // The ResultCallback is used for both the RequestPathAccess and 26 // The ResultCallback is used for both the RequestPathAccess and
27 // RequestUsbAcess methods. Its boolean parameter represents the result of the 27 // RequestUsbAccess methods. Its boolean parameter represents the result of
28 // operation that it was submitted alongside. 28 // the operation that it was submitted alongside.
29 typedef base::Callback<void(bool)> ResultCallback; 29 typedef base::Callback<void(bool)> ResultCallback;
30 30
31 virtual ~PermissionBrokerClient(); 31 virtual ~PermissionBrokerClient();
32 32
33 static PermissionBrokerClient* Create(); 33 static PermissionBrokerClient* Create();
34 34
35 // RequestPathAccess requests access to a single device node identified by 35 // RequestPathAccess requests access to a single device node identified by
36 // |path|. If |interface_id| value is passed (different than 36 // |path|. If |interface_id| value is passed (different than
37 // UsbDevicePermissionData::ANY_INTERFACE), the request will check if a 37 // UsbDevicePermissionData::ANY_INTERFACE), the request will check if a
38 // specific interface is claimed while requesting access. 38 // specific interface is claimed while requesting access.
(...skipping 18 matching lines...) Expand all
57 protected: 57 protected:
58 PermissionBrokerClient(); 58 PermissionBrokerClient();
59 59
60 private: 60 private:
61 DISALLOW_COPY_AND_ASSIGN(PermissionBrokerClient); 61 DISALLOW_COPY_AND_ASSIGN(PermissionBrokerClient);
62 }; 62 };
63 63
64 } // namespace chromeos 64 } // namespace chromeos
65 65
66 #endif // CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_ 66 #endif // CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/usb/android_usb_device.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698