OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_COMMON_API_BLUETOOTH_BLUETOOTH_MANIFEST_DATA_H_ | 5 #ifndef EXTENSIONS_COMMON_API_BLUETOOTH_BLUETOOTH_MANIFEST_DATA_H_ |
6 #define EXTENSIONS_COMMON_API_BLUETOOTH_BLUETOOTH_MANIFEST_DATA_H_ | 6 #define EXTENSIONS_COMMON_API_BLUETOOTH_BLUETOOTH_MANIFEST_DATA_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "extensions/common/extension.h" | 11 #include "extensions/common/extension.h" |
12 #include "extensions/common/manifest_handler.h" | 12 #include "extensions/common/manifest_handler.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 class BluetoothManifestPermission; | 15 class BluetoothManifestPermission; |
16 struct BluetoothPermissionRequest; | 16 struct BluetoothPermissionRequest; |
17 } | 17 } |
18 | 18 |
19 namespace extensions { | 19 namespace extensions { |
20 | 20 |
21 // The parsed form of the "bluetooth" manifest entry. | 21 // The parsed form of the "bluetooth" manifest entry. |
22 class BluetoothManifestData : public Extension::ManifestData { | 22 class BluetoothManifestData : public Extension::ManifestData { |
23 public: | 23 public: |
24 explicit BluetoothManifestData( | 24 explicit BluetoothManifestData( |
25 scoped_ptr<BluetoothManifestPermission> permission); | 25 scoped_ptr<BluetoothManifestPermission> permission); |
26 virtual ~BluetoothManifestData(); | 26 ~BluetoothManifestData() override; |
27 | 27 |
28 // Gets the BluetoothManifestData for |extension|, or NULL if none was | 28 // Gets the BluetoothManifestData for |extension|, or NULL if none was |
29 // specified. | 29 // specified. |
30 static BluetoothManifestData* Get(const Extension* extension); | 30 static BluetoothManifestData* Get(const Extension* extension); |
31 | 31 |
32 static bool CheckRequest(const Extension* extension, | 32 static bool CheckRequest(const Extension* extension, |
33 const BluetoothPermissionRequest& request); | 33 const BluetoothPermissionRequest& request); |
34 | 34 |
35 static bool CheckSocketPermitted(const Extension* extension); | 35 static bool CheckSocketPermitted(const Extension* extension); |
36 static bool CheckLowEnergyPermitted(const Extension* extension); | 36 static bool CheckLowEnergyPermitted(const Extension* extension); |
(...skipping 15 matching lines...) Expand all Loading... |
52 struct BluetoothPermissionRequest { | 52 struct BluetoothPermissionRequest { |
53 explicit BluetoothPermissionRequest(const std::string& uuid); | 53 explicit BluetoothPermissionRequest(const std::string& uuid); |
54 ~BluetoothPermissionRequest(); | 54 ~BluetoothPermissionRequest(); |
55 | 55 |
56 std::string uuid; | 56 std::string uuid; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace extensions | 59 } // namespace extensions |
60 | 60 |
61 #endif // EXTENSIONS_COMMON_API_BLUETOOTH_BLUETOOTH_MANIFEST_DATA_H_ | 61 #endif // EXTENSIONS_COMMON_API_BLUETOOTH_BLUETOOTH_MANIFEST_DATA_H_ |
OLD | NEW |