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

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

Issue 2148943002: mash: Create system tray display and rotation lock items via delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, add rotation lock Created 4 years, 5 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 | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
26 #include "ash/common/system/ime/ime_observer.h" 26 #include "ash/common/system/ime/ime_observer.h"
27 #include "ash/common/system/tray/system_tray_delegate.h" 27 #include "ash/common/system/tray/system_tray_delegate.h"
28 #include "ash/common/system/tray/system_tray_notifier.h" 28 #include "ash/common/system/tray/system_tray_notifier.h"
29 #include "ash/common/system/tray_accessibility.h" 29 #include "ash/common/system/tray_accessibility.h"
30 #include "ash/common/system/update/update_observer.h" 30 #include "ash/common/system/update/update_observer.h"
31 #include "ash/common/system/user/user_observer.h" 31 #include "ash/common/system/user/user_observer.h"
32 #include "ash/common/system/volume_control_delegate.h" 32 #include "ash/common/system/volume_control_delegate.h"
33 #include "ash/common/wm_shell.h" 33 #include "ash/common/wm_shell.h"
34 #include "ash/desktop_background/desktop_background_controller.h" 34 #include "ash/desktop_background/desktop_background_controller.h"
35 #include "ash/shell.h" 35 #include "ash/shell.h"
36 #include "ash/system/chromeos/rotation/tray_rotation_lock.h"
37 #include "ash/system/chromeos/tray_display.h"
36 #include "ash/system/tray/system_tray.h" 38 #include "ash/system/tray/system_tray.h"
37 #include "ash/wm/lock_state_controller.h" 39 #include "ash/wm/lock_state_controller.h"
38 #include "base/bind_helpers.h" 40 #include "base/bind_helpers.h"
39 #include "base/callback.h" 41 #include "base/callback.h"
40 #include "base/logging.h" 42 #include "base/logging.h"
41 #include "base/memory/ptr_util.h" 43 #include "base/memory/ptr_util.h"
42 #include "base/memory/weak_ptr.h" 44 #include "base/memory/weak_ptr.h"
43 #include "base/strings/stringprintf.h" 45 #include "base/strings/stringprintf.h"
44 #include "base/strings/utf_string_conversions.h" 46 #include "base/strings/utf_string_conversions.h"
45 #include "base/sys_info.h" 47 #include "base/sys_info.h"
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 845
844 void SystemTrayDelegateChromeOS::ShouldRebootOnShutdown( 846 void SystemTrayDelegateChromeOS::ShouldRebootOnShutdown(
845 const ash::RebootOnShutdownCallback& callback) { 847 const ash::RebootOnShutdownCallback& callback) {
846 shutdown_policy_handler_->CheckIfRebootOnShutdown(callback); 848 shutdown_policy_handler_->CheckIfRebootOnShutdown(callback);
847 } 849 }
848 850
849 ash::VPNDelegate* SystemTrayDelegateChromeOS::GetVPNDelegate() const { 851 ash::VPNDelegate* SystemTrayDelegateChromeOS::GetVPNDelegate() const {
850 return vpn_delegate_.get(); 852 return vpn_delegate_.get();
851 } 853 }
852 854
855 std::unique_ptr<ash::SystemTrayItem>
856 SystemTrayDelegateChromeOS::CreateDisplayTrayItem(ash::SystemTray* tray) {
857 return base::MakeUnique<ash::TrayDisplay>(tray);
858 }
859
860 std::unique_ptr<ash::SystemTrayItem>
861 SystemTrayDelegateChromeOS::CreateRotationLockTrayItem(ash::SystemTray* tray) {
862 return base::MakeUnique<ash::TrayRotationLock>(tray);
863 }
864
853 void SystemTrayDelegateChromeOS::UserAddedToSession( 865 void SystemTrayDelegateChromeOS::UserAddedToSession(
854 const user_manager::User* active_user) { 866 const user_manager::User* active_user) {
855 } 867 }
856 868
857 void SystemTrayDelegateChromeOS::ActiveUserChanged( 869 void SystemTrayDelegateChromeOS::ActiveUserChanged(
858 const user_manager::User* /* active_user */) { 870 const user_manager::User* /* active_user */) {
859 } 871 }
860 872
861 void SystemTrayDelegateChromeOS::UserChangedChildStatus( 873 void SystemTrayDelegateChromeOS::UserChangedChildStatus(
862 user_manager::User* user) { 874 user_manager::User* user) {
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1333 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1322 << "ENABLE_SUPERVISED_USERS undefined."; 1334 << "ENABLE_SUPERVISED_USERS undefined.";
1323 return base::string16(); 1335 return base::string16();
1324 } 1336 }
1325 1337
1326 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1338 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1327 return new SystemTrayDelegateChromeOS(); 1339 return new SystemTrayDelegateChromeOS();
1328 } 1340 }
1329 1341
1330 } // namespace chromeos 1342 } // namespace chromeos
OLDNEW
« no previous file with comments | « 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