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

Unified Diff: chrome/browser/ui/webui/options/chromeos/system_options_handler.h

Issue 8233042: Chrome OS: Attach bluetooth UI to device discovery API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/chromeos/system_options_handler.h
diff --git a/chrome/browser/ui/webui/options/chromeos/system_options_handler.h b/chrome/browser/ui/webui/options/chromeos/system_options_handler.h
index 082e6dfd4fa7632150205f28f412a320f96adc55..c5921d5d017ba4504740804ae416ce63ae540ebc 100644
--- a/chrome/browser/ui/webui/options/chromeos/system_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/system_options_handler.h
@@ -6,6 +6,10 @@
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_OPTIONS_HANDLER_H_
#pragma once
+#include <string>
+
+#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
+#include "chrome/browser/chromeos/bluetooth/bluetooth_manager.h"
#include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler.h"
namespace base {
@@ -13,7 +17,9 @@ class DictionaryValue;
}
// ChromeOS system options page UI handler.
-class SystemOptionsHandler : public chromeos::CrosOptionsPageUIHandler {
+class SystemOptionsHandler : public chromeos::CrosOptionsPageUIHandler,
+ public chromeos::BluetoothManager::Observer,
+ public chromeos::BluetoothAdapter::Observer {
public:
SystemOptionsHandler();
virtual ~SystemOptionsHandler();
@@ -51,11 +57,34 @@ class SystemOptionsHandler : public chromeos::CrosOptionsPageUIHandler {
// for device are "deviceName", "deviceId", "deviceType" and "deviceStatus".
void BluetoothDeviceNotification(const base::DictionaryValue& device);
+ // chromeos::BluetoothManager::Observer override.
+ virtual void DefaultAdapterChanged(chromeos::BluetoothAdapter* adapter);
+
+ // chromeos::BluetoothAdapter::Observer override.
+ virtual void DiscoveryStarted(const std::string& adapter_id);
+
+ // chromeos::BluetoothAdapter::Observer override.
+ virtual void DiscoveryEnded(const std::string& adapter_id);
+
+ // chromeos::BluetoothAdapter::Observer override.
+ virtual void DeviceFound(const std::string& adapter_id,
+ chromeos::BluetoothDevice* device);
+
private:
+ // Initializes the bluetooth settings UI.
+ void InitializeBluetooth();
+
+ // Shuts down the bluetooth settings UI.
+ void ShutdownBluetooth();
+
// Simulates extracting a list of available bluetooth devices.
// Called when emulating ChromeOS from a desktop environment.
void GenerateFakeDeviceList();
+ // The id of the current default bluetooth adapter.
+ // The empty string represents "none".
+ std::string default_adapter_id_;
+
DISALLOW_COPY_AND_ASSIGN(SystemOptionsHandler);
};

Powered by Google App Engine
This is Rietveld 408576698