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

Side by Side Diff: content/browser/bluetooth/first_device_bluetooth_chooser.h

Issue 1286063002: Add a path for content/ to open and control a Bluetooth chooser dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Remove an unnecessary include and forward decl 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_BLUETOOTH_FIRST_DEVICE_BLUETOOTH_CHOOSER_H_
6 #define CONTENT_BROWSER_BLUETOOTH_FIRST_DEVICE_BLUETOOTH_CHOOSER_H_
7
8 #include "content/public/browser/bluetooth_chooser.h"
9
10 namespace content {
11
12 // Implements a Bluetooth chooser that, instead of showing a dialog, selects the
13 // first added device, or cancels if no device is added before discovery stops.
14 // This is used as a default chooser implementation for platforms without a full
15 // UI.
16 class FirstDeviceBluetoothChooser : public BluetoothChooser {
17 public:
18 // |observer| must outlive |this|.
19 FirstDeviceBluetoothChooser(Observer* observer, int chooser_id)
20 : BluetoothChooser(observer, chooser_id) {}
21
22 // BluetoothChooser implementation:
23 void SetAdapterPresence(AdapterPresence presence) override;
24 void ShowDiscoveryState(DiscoveryState state) override;
25 void AddDevice(const std::string& device_id,
26 const base::string16& device_name) override;
27 void RemoveDevice(const std::string& device_id) override {}
28 };
29
30 } // namespace content
31
32 #endif // CONTENT_BROWSER_BLUETOOTH_FIRST_DEVICE_BLUETOOTH_CHOOSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698