Implement methods for pairing of bluetooth devices.

BUG=chromium:100392,chromium:102139
TEST=

Review URL: http://codereview.chromium.org/8495018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109094 0039d316-1c4b-4281-b951-d872f2087c98
void BluetoothOptionsHandler::Initialize() {
  DCHECK(web_ui_);
  if (!CommandLine::ForCurrentProcess()
      ->HasSwitch(switches::kEnableBluetooth)) {
    return;
  }

  web_ui_->CallJavascriptFunction(
      "options.SystemOptions.showBluetoothSettings");

  bool bluetooth_on = true;
  base::FundamentalValue checked(bluetooth_on);
  web_ui_->CallJavascriptFunction(
      "options.SystemOptions.setBluetoothCheckboxState", checked);

  chromeos::BluetoothManager* bluetooth_manager =
      chromeos::BluetoothManager::GetInstance();
  DCHECK(bluetooth_manager);
  bluetooth_manager->AddObserver(this);

  chromeos::BluetoothAdapter* default_adapter =
      bluetooth_manager->DefaultAdapter();
  DefaultAdapterChanged(default_adapter);
}

void BluetoothOptionsHandler::Initialize() {
  DCHECK(web_ui_);
  if (!CommandLine::ForCurrentProcess()
      ->HasSwitch(switches::kEnableBluetooth)) {
    return;
  }

  web_ui_->CallJavascriptFunction(
      "options.SystemOptions.showBluetoothSettings");

  bool bluetooth_on = true;
  base::FundamentalValue checked(bluetooth_on);
  web_ui_->CallJavascriptFunction(
      "options.SystemOptions.setBluetoothCheckboxState", checked);

  chromeos::BluetoothManager* bluetooth_manager =
      chromeos::BluetoothManager::GetInstance();
  DCHECK(bluetooth_manager);
  bluetooth_manager->AddObserver(this);

  chromeos::BluetoothAdapter* default_adapter =
      bluetooth_manager->DefaultAdapter();
  DefaultAdapterChanged(default_adapter);
}
