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

Side by Side Diff: content/shell/browser/layout_test/layout_test_first_device_bluetooth_chooser.h

Issue 2110813002: bluetooth: Move First Device Chooser to tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Created 4 years, 5 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_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_FIRST_DEVICE_BLUETOOTH_CHO OSER_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_FIRST_DEVICE_BLUETOOTH_CHO OSER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "content/public/browser/bluetooth_chooser.h"
12
13 namespace content {
14
15 // Implements a Bluetooth chooser that selects the first added device, or
16 // cancels if no device is added before discovery stops. This is used as a
17 // default chooser implementation for testing.
18 class LayoutTestFirstDeviceBluetoothChooser : public BluetoothChooser {
19 public:
20 // See the BluetoothChooser::EventHandler comments for how |event_handler| is
21 // used.
22 explicit LayoutTestFirstDeviceBluetoothChooser(
23 const EventHandler& event_handler);
24 ~LayoutTestFirstDeviceBluetoothChooser() override;
25
26 // BluetoothChooser:
27 void SetAdapterPresence(AdapterPresence presence) override;
28 void ShowDiscoveryState(DiscoveryState state) override;
29 void AddDevice(const std::string& device_id,
30 const base::string16& device_name) override;
31 void RemoveDevice(const std::string& device_id) override {}
32
33 private:
34 EventHandler event_handler_;
35
36 DISALLOW_COPY_AND_ASSIGN(LayoutTestFirstDeviceBluetoothChooser);
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_FIRST_DEVICE_BLUETOOTH_ CHOOSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698