OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/browser/web_contents.h" | |
Jeffrey Yasskin
2015/09/03 17:22:01
I think you don't need this #include anymore.
| |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 // Represents a way to ask the user to select a Bluetooth device from a list of | 17 // Represents a way to ask the user to select a Bluetooth device from a list of |
17 // options. | 18 // options. |
18 class CONTENT_EXPORT BluetoothChooser { | 19 class CONTENT_EXPORT BluetoothChooser { |
19 public: | 20 public: |
20 enum class Event { | 21 enum class Event { |
21 // The user cancelled the chooser instead of selecting a device. | 22 // The user cancelled the chooser instead of selecting a device. |
22 CANCELLED, | 23 CANCELLED, |
23 // The user selected device |opt_device_id|. | 24 // The user selected device |opt_device_id|. |
24 SELECTED, | 25 SELECTED, |
26 // The user asked for a new Bluetooth discovery session to start. | |
27 RESCAN, | |
28 // Show overview page for Bluetooth. | |
29 SHOW_OVERVIEW_HELP, | |
30 // Show help page explaining what Bluetooth pairing means. | |
31 SHOW_PAIRING_HELP, | |
32 // Show help page explaining why scanning failed because Bluetooth is off. | |
33 SHOW_ADAPTER_OFF_HELP, | |
25 | 34 |
26 // As the dialog implementations grow more user-visible buttons and knobs, | 35 // As the dialog implementations grow more user-visible buttons and knobs, |
27 // we'll add enumerators here to support them. | 36 // we'll add enumerators here to support them. |
28 }; | 37 }; |
29 | 38 |
30 // Chooser implementations are constructed with an |EventHandler| and report | 39 // Chooser implementations are constructed with an |EventHandler| and report |
31 // user interaction with the chooser through it. |opt_device_id| is an empty | 40 // user interaction with the chooser through it. |opt_device_id| is an empty |
32 // string except for Event::SELECTED. | 41 // string except for Event::SELECTED. |
33 // | 42 // |
34 // The EventHandler won't be called after the chooser object is destroyed. | 43 // The EventHandler won't be called after the chooser object is destroyed. |
(...skipping 22 matching lines...) Expand all Loading... | |
57 const base::string16& device_name) {} | 66 const base::string16& device_name) {} |
58 | 67 |
59 // Tells the chooser that a device is no longer available. The chooser should | 68 // Tells the chooser that a device is no longer available. The chooser should |
60 // not call DeviceSelected() for a device that's been removed. | 69 // not call DeviceSelected() for a device that's been removed. |
61 virtual void RemoveDevice(const std::string& device_id) {} | 70 virtual void RemoveDevice(const std::string& device_id) {} |
62 }; | 71 }; |
63 | 72 |
64 } // namespace content | 73 } // namespace content |
65 | 74 |
66 #endif // CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ | 75 #endif // CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ |
OLD | NEW |