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

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

Issue 2754143006: cros: Convert SystemTrayDelegate::ManageBluetoothDevices to mojo for mash (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « no previous file | ash/common/system/tray/system_tray_controller.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 "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" 5 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/system/tray/hover_highlight_view.h" 8 #include "ash/common/system/tray/hover_highlight_view.h"
9 #include "ash/common/system/tray/system_tray.h" 9 #include "ash/common/system/tray/system_tray.h"
10 #include "ash/common/system/tray/system_tray_controller.h"
10 #include "ash/common/system/tray/system_tray_delegate.h" 11 #include "ash/common/system/tray/system_tray_delegate.h"
11 #include "ash/common/system/tray/system_tray_notifier.h" 12 #include "ash/common/system/tray/system_tray_notifier.h"
12 #include "ash/common/system/tray/throbber_view.h" 13 #include "ash/common/system/tray/throbber_view.h"
13 #include "ash/common/system/tray/tray_constants.h" 14 #include "ash/common/system/tray/tray_constants.h"
14 #include "ash/common/system/tray/tray_details_view.h" 15 #include "ash/common/system/tray/tray_details_view.h"
15 #include "ash/common/system/tray/tray_item_more.h" 16 #include "ash/common/system/tray/tray_item_more.h"
16 #include "ash/common/system/tray/tray_popup_item_style.h" 17 #include "ash/common/system/tray/tray_popup_item_style.h"
17 #include "ash/common/system/tray/tray_popup_utils.h" 18 #include "ash/common/system/tray/tray_popup_utils.h"
18 #include "ash/common/system/tray/tri_view.h" 19 #include "ash/common/system/tray/tri_view.h"
19 #include "ash/common/wm_shell.h" 20 #include "ash/common/wm_shell.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 TrayPopupUtils::CreateToggleButton(this, IDS_ASH_STATUS_TRAY_BLUETOOTH); 481 TrayPopupUtils::CreateToggleButton(this, IDS_ASH_STATUS_TRAY_BLUETOOTH);
481 tri_view()->AddView(TriView::Container::END, toggle_); 482 tri_view()->AddView(TriView::Container::END, toggle_);
482 483
483 settings_ = 484 settings_ =
484 CreateSettingsButton(login_, IDS_ASH_STATUS_TRAY_BLUETOOTH_SETTINGS); 485 CreateSettingsButton(login_, IDS_ASH_STATUS_TRAY_BLUETOOTH_SETTINGS);
485 tri_view()->AddView(TriView::Container::END, settings_); 486 tri_view()->AddView(TriView::Container::END, settings_);
486 } 487 }
487 488
488 void ShowSettings() { 489 void ShowSettings() {
489 if (TrayPopupUtils::CanOpenWebUISettings(login_)) { 490 if (TrayPopupUtils::CanOpenWebUISettings(login_)) {
490 WmShell::Get()->system_tray_delegate()->ManageBluetoothDevices(); 491 WmShell::Get()->system_tray_controller()->ShowBluetoothSettings();
491 owner()->system_tray()->CloseSystemBubble(); 492 owner()->system_tray()->CloseSystemBubble();
492 } 493 }
493 } 494 }
494 495
495 void ShowLoadingIndicator() { 496 void ShowLoadingIndicator() {
496 // Setting a value of -1 gives progress_bar an infinite-loading behavior. 497 // Setting a value of -1 gives progress_bar an infinite-loading behavior.
497 ShowProgress(-1, true); 498 ShowProgress(-1, true);
498 } 499 }
499 500
500 void HideLoadingIndicator() { ShowProgress(0, false); } 501 void HideLoadingIndicator() { ShowProgress(0, false); }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 detailed_->Update(); 646 detailed_->Update();
646 } 647 }
647 648
648 void TrayBluetooth::OnBluetoothDiscoveringChanged() { 649 void TrayBluetooth::OnBluetoothDiscoveringChanged() {
649 if (!detailed_) 650 if (!detailed_)
650 return; 651 return;
651 detailed_->Update(); 652 detailed_->Update();
652 } 653 }
653 654
654 } // namespace ash 655 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/system_tray_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698