| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 input_method::GetInputMethodManager()->AddObserver(this); | 261 input_method::GetInputMethodManager()->AddObserver(this); |
| 262 | 262 |
| 263 system::TimezoneSettings::GetInstance()->AddObserver(this); | 263 system::TimezoneSettings::GetInstance()->AddObserver(this); |
| 264 | 264 |
| 265 if (SystemKeyEventListener::GetInstance()) | 265 if (SystemKeyEventListener::GetInstance()) |
| 266 SystemKeyEventListener::GetInstance()->AddCapsLockObserver(this); | 266 SystemKeyEventListener::GetInstance()->AddCapsLockObserver(this); |
| 267 | 267 |
| 268 network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT); | 268 network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT); |
| 269 network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK); | 269 network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK); |
| 270 | 270 |
| 271 device::BluetoothAdapterFactory::RunCallbackOnAdapterReady( | 271 device::BluetoothAdapterFactory::GetAdapter( |
| 272 base::Bind(&SystemTrayDelegate::InitializeOnAdapterReady, | 272 base::Bind(&SystemTrayDelegate::InitializeOnAdapterReady, |
| 273 ui_weak_ptr_factory_->GetWeakPtr())); | 273 ui_weak_ptr_factory_->GetWeakPtr())); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void InitializeOnAdapterReady( | 276 void InitializeOnAdapterReady( |
| 277 scoped_refptr<device::BluetoothAdapter> adapter) { | 277 scoped_refptr<device::BluetoothAdapter> adapter) { |
| 278 bluetooth_adapter_ = adapter; | 278 bluetooth_adapter_ = adapter; |
| 279 CHECK(bluetooth_adapter_); | 279 CHECK(bluetooth_adapter_); |
| 280 bluetooth_adapter_->AddObserver(this); | 280 bluetooth_adapter_->AddObserver(this); |
| 281 | 281 |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1402 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1403 }; | 1403 }; |
| 1404 | 1404 |
| 1405 } // namespace | 1405 } // namespace |
| 1406 | 1406 |
| 1407 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1407 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1408 return new chromeos::SystemTrayDelegate(); | 1408 return new chromeos::SystemTrayDelegate(); |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 } // namespace chromeos | 1411 } // namespace chromeos |
| OLD | NEW |