OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTEXT_H_ | |
6 #define CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTEXT_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/macros.h" | |
11 #include "chrome/browser/permissions/chooser_context_base.h" | |
12 | |
13 class BluetoothChooserContext : public ChooserContextBase { | |
14 public: | |
15 explicit BluetoothChooserContext(Profile* profile); | |
16 ~BluetoothChooserContext() override; | |
17 | |
18 // Grants |requesting_origin| access to the Bluetooth device known as | |
19 // |device_id|. | |
20 void GrantDevicePermission(const GURL& requesting_origin, | |
21 const GURL& embedding_origin, | |
22 const std::string& device_id); | |
Reilly Grant (use Gerrit)
2016/01/05 23:08:51
Like UsbChooserContext this should also store the
juncai
2016/01/05 23:56:15
Done
| |
23 | |
24 // Revokes |requesting_origin|'s access to the Bluetooth device known as | |
25 // |device_id|. | |
26 void RevokeDevicePermission(const GURL& requesting_origin, | |
27 const GURL& embedding_origin, | |
28 const std::string& device_id); | |
29 | |
30 // Checks if |requesting_origin| (when embedded within |embedding_origin| has | |
31 // access to the Bluetooth device known as |device_id|. | |
32 bool HasDevicePermission(const GURL& requesting_origin, | |
33 const GURL& embedding_origin, | |
34 const std::string& device_id); | |
35 | |
36 private: | |
37 // ChooserContextBase: | |
38 bool IsValidObject(const base::DictionaryValue& object) override; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(BluetoothChooserContext); | |
41 }; | |
42 | |
43 #endif // CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTEXT_H_ | |
OLD | NEW |