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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 2505783002: chromeos: Migrate SignOut and RequestRestartForUpdate to mojo interface (Closed)
Patch Set: Created 4 years, 1 month 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 <set> 10 #include <set>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "chrome/browser/chromeos/login/help_app_launcher.h" 47 #include "chrome/browser/chromeos/login/help_app_launcher.h"
48 #include "chrome/browser/chromeos/login/login_wizard.h" 48 #include "chrome/browser/chromeos/login/login_wizard.h"
49 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 49 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
50 #include "chrome/browser/chromeos/login/user_flow.h" 50 #include "chrome/browser/chromeos/login/user_flow.h"
51 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" 51 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
52 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" 52 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
53 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 53 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
54 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 54 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
55 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" 55 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
56 #include "chrome/browser/chromeos/profiles/profile_helper.h" 56 #include "chrome/browser/chromeos/profiles/profile_helper.h"
57 #include "chrome/browser/lifetime/application_lifetime.h"
58 #include "chrome/browser/profiles/profile_manager.h" 57 #include "chrome/browser/profiles/profile_manager.h"
59 #include "chrome/browser/supervised_user/supervised_user_service.h" 58 #include "chrome/browser/supervised_user/supervised_user_service.h"
60 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 59 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
61 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h" 60 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h"
62 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 61 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
63 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h" 62 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h"
64 #include "chrome/browser/ui/ash/system_tray_client.h" 63 #include "chrome/browser/ui/ash/system_tray_client.h"
65 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h" 64 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h"
66 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h" 65 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h"
67 #include "chrome/browser/ui/browser.h" 66 #include "chrome/browser/ui/browser.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if (show_intro) { 393 if (show_intro) {
395 base::Callback<void(bool)> on_accept = 394 base::Callback<void(bool)> on_accept =
396 base::Bind(&OnAcceptMultiprofilesIntro); 395 base::Bind(&OnAcceptMultiprofilesIntro);
397 ShowMultiprofilesIntroDialog(on_accept); 396 ShowMultiprofilesIntroDialog(on_accept);
398 } else { 397 } else {
399 UserAddingScreen::Get()->Start(); 398 UserAddingScreen::Get()->Start();
400 } 399 }
401 } 400 }
402 } 401 }
403 402
404 void SystemTrayDelegateChromeOS::SignOut() {
405 chrome::AttemptUserExit();
406 }
407
408 void SystemTrayDelegateChromeOS::RequestRestartForUpdate() {
409 // We expect that UpdateEngine is in "Reboot for update" state now.
410 chrome::NotifyAndTerminate(true /* fast path */);
411 }
412
413 void SystemTrayDelegateChromeOS::GetAvailableBluetoothDevices( 403 void SystemTrayDelegateChromeOS::GetAvailableBluetoothDevices(
414 ash::BluetoothDeviceList* list) { 404 ash::BluetoothDeviceList* list) {
415 device::BluetoothAdapter::DeviceList devices = 405 device::BluetoothAdapter::DeviceList devices =
416 bluetooth_adapter_->GetDevices(); 406 bluetooth_adapter_->GetDevices();
417 for (size_t i = 0; i < devices.size(); ++i) { 407 for (size_t i = 0; i < devices.size(); ++i) {
418 device::BluetoothDevice* device = devices[i]; 408 device::BluetoothDevice* device = devices[i];
419 ash::BluetoothDeviceInfo info; 409 ash::BluetoothDeviceInfo info;
420 info.address = device->GetAddress(); 410 info.address = device->GetAddress();
421 info.display_name = device->GetNameForDisplay(); 411 info.display_name = device->GetNameForDisplay();
422 info.connected = device->IsConnected(); 412 info.connected = device->IsConnected();
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1009 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1020 << "ENABLE_SUPERVISED_USERS undefined."; 1010 << "ENABLE_SUPERVISED_USERS undefined.";
1021 return base::string16(); 1011 return base::string16();
1022 } 1012 }
1023 1013
1024 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1014 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1025 return new SystemTrayDelegateChromeOS(); 1015 return new SystemTrayDelegateChromeOS();
1026 } 1016 }
1027 1017
1028 } // namespace chromeos 1018 } // namespace chromeos
OLDNEW
« ash/common/wm_shell.cc ('K') | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698