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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 12018024: Implemented Asynchronous Initialization of BluetoothAdapter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Turned adapter_callbacks to a lazy instance. Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698