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

Side by Side Diff: ash/system/bluetooth/tray_bluetooth.cc

Issue 210903003: Implemented system tray UI for new account management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflicts resolved. Created 6 years, 8 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 | « ash/shell_delegate.h ('k') | ash/system/chromeos/label_tray_view.cc » ('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 "ash/system/bluetooth/tray_bluetooth.h" 5 #include "ash/system/bluetooth/tray_bluetooth.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/fixed_sized_scroll_view.h" 8 #include "ash/system/tray/fixed_sized_scroll_view.h"
9 #include "ash/system/tray/hover_highlight_view.h" 9 #include "ash/system/tray/hover_highlight_view.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // user. 303 // user.
304 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED) 304 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED)
305 return; 305 return;
306 306
307 ash::SystemTrayDelegate* delegate = 307 ash::SystemTrayDelegate* delegate =
308 ash::Shell::GetInstance()->system_tray_delegate(); 308 ash::Shell::GetInstance()->system_tray_delegate();
309 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 309 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
310 HoverHighlightView* container = new HoverHighlightView(this); 310 HoverHighlightView* container = new HoverHighlightView(this);
311 container->AddLabel( 311 container->AddLabel(
312 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES), 312 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES),
313 gfx::ALIGN_LEFT,
313 gfx::Font::NORMAL); 314 gfx::Font::NORMAL);
314 container->SetEnabled(delegate->GetBluetoothAvailable()); 315 container->SetEnabled(delegate->GetBluetoothAvailable());
315 AddChildView(container); 316 AddChildView(container);
316 manage_devices_ = container; 317 manage_devices_ = container;
317 } 318 }
318 319
319 // Returns true if the device with |device_id| is found in |device_list|, 320 // Returns true if the device with |device_id| is found in |device_list|,
320 // and the display_name of the device will be returned in |display_name| if 321 // and the display_name of the device will be returned in |display_name| if
321 // it's not NULL. 322 // it's not NULL.
322 bool FoundDevice(const std::string& device_id, 323 bool FoundDevice(const std::string& device_id,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 detailed_->Update(); 461 detailed_->Update();
461 } 462 }
462 463
463 void TrayBluetooth::OnBluetoothDiscoveringChanged() { 464 void TrayBluetooth::OnBluetoothDiscoveringChanged() {
464 if (!detailed_) 465 if (!detailed_)
465 return; 466 return;
466 detailed_->Update(); 467 detailed_->Update();
467 } 468 }
468 469
469 } // namespace ash 470 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell_delegate.h ('k') | ash/system/chromeos/label_tray_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698