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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 ->GetActiveIMEState() 421 ->GetActiveIMEState()
422 ->ChangeInputMethod(ime_id, false /* show_message */); 422 ->ChangeInputMethod(ime_id, false /* show_message */);
423 input_method::InputMethodSwitchRecorder::Get()->RecordSwitch( 423 input_method::InputMethodSwitchRecorder::Get()->RecordSwitch(
424 true /* by_tray_menu */); 424 true /* by_tray_menu */);
425 } 425 }
426 426
427 void SystemTrayDelegateChromeOS::ActivateIMEProperty(const std::string& key) { 427 void SystemTrayDelegateChromeOS::ActivateIMEProperty(const std::string& key) {
428 input_method::InputMethodManager::Get()->ActivateInputMethodMenuItem(key); 428 input_method::InputMethodManager::Get()->ActivateInputMethodMenuItem(key);
429 } 429 }
430 430
431 // TODO(jamescook): Move to SystemTrayClient where other Web UI lives.
432 void SystemTrayDelegateChromeOS::ManageBluetoothDevices() {
433 content::RecordAction(base::UserMetricsAction("ShowBluetoothSettingsPage"));
434 chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(),
435 chrome::kBluetoothSubPage);
436 }
437
438 void SystemTrayDelegateChromeOS::ToggleBluetooth() { 431 void SystemTrayDelegateChromeOS::ToggleBluetooth() {
439 bluetooth_helper_->ToggleEnabled(); 432 bluetooth_helper_->ToggleEnabled();
440 } 433 }
441 434
442 bool SystemTrayDelegateChromeOS::GetBluetoothAvailable() { 435 bool SystemTrayDelegateChromeOS::GetBluetoothAvailable() {
443 return bluetooth_helper_->GetAvailable(); 436 return bluetooth_helper_->GetAvailable();
444 } 437 }
445 438
446 bool SystemTrayDelegateChromeOS::GetBluetoothEnabled() { 439 bool SystemTrayDelegateChromeOS::GetBluetoothEnabled() {
447 return bluetooth_helper_->GetEnabled(); 440 return bluetooth_helper_->GetEnabled();
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 835 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
843 << "ENABLE_SUPERVISED_USERS undefined."; 836 << "ENABLE_SUPERVISED_USERS undefined.";
844 return base::string16(); 837 return base::string16();
845 } 838 }
846 839
847 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 840 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
848 return new SystemTrayDelegateChromeOS(); 841 return new SystemTrayDelegateChromeOS();
849 } 842 }
850 843
851 } // namespace chromeos 844 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/ash/tray_bluetooth_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698