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

Side by Side Diff: chrome/browser/ui/bluetooth/bluetooth_chooser_context.h

Issue 1560263002: Store Bluetooth permissions in website settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: store Bluetooth permissions in website settings Created 4 years, 11 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698