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

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

Issue 2438023004: mash: Migrate ShowSetTimeDialog from SystemTrayDelegate to mojo (Closed)
Patch Set: rebase 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
« 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/chromeos/login/login_wizard.h" 52 #include "chrome/browser/chromeos/login/login_wizard.h"
53 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 53 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
54 #include "chrome/browser/chromeos/login/user_flow.h" 54 #include "chrome/browser/chromeos/login/user_flow.h"
55 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" 55 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
56 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" 56 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
57 #include "chrome/browser/chromeos/options/network_config_view.h" 57 #include "chrome/browser/chromeos/options/network_config_view.h"
58 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 58 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
59 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 59 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
60 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" 60 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
61 #include "chrome/browser/chromeos/profiles/profile_helper.h" 61 #include "chrome/browser/chromeos/profiles/profile_helper.h"
62 #include "chrome/browser/chromeos/set_time_dialog.h"
63 #include "chrome/browser/chromeos/settings/cros_settings.h" 62 #include "chrome/browser/chromeos/settings/cros_settings.h"
64 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" 63 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
65 #include "chrome/browser/lifetime/application_lifetime.h" 64 #include "chrome/browser/lifetime/application_lifetime.h"
66 #include "chrome/browser/profiles/profile_manager.h" 65 #include "chrome/browser/profiles/profile_manager.h"
67 #include "chrome/browser/supervised_user/supervised_user_service.h" 66 #include "chrome/browser/supervised_user/supervised_user_service.h"
68 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 67 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
69 #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h" 68 #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h"
70 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h" 69 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h"
71 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 70 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
72 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h" 71 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 ash::UpdateInfo* info) const { 340 ash::UpdateInfo* info) const {
342 GetUpdateInfo(UpgradeDetector::GetInstance(), info); 341 GetUpdateInfo(UpgradeDetector::GetInstance(), info);
343 } 342 }
344 343
345 bool SystemTrayDelegateChromeOS::ShouldShowSettings() { 344 bool SystemTrayDelegateChromeOS::ShouldShowSettings() {
346 ash::WmShell* wm_shell = ash::WmShell::Get(); 345 ash::WmShell* wm_shell = ash::WmShell::Get();
347 return ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings() && 346 return ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings() &&
348 !wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); 347 !wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
349 } 348 }
350 349
351 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() {
352 // TODO(mash): Move to SystemTrayClient.
353 SetTimeDialog::ShowDialogInContainer(
354 SystemTrayClient::GetDialogParentContainerId());
355 }
356
357 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() { 350 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() {
358 // TODO(mash): Refactor out SessionStateDelegate and move to SystemTrayClient. 351 // TODO(mash): Refactor out SessionStateDelegate and move to SystemTrayClient.
359 ash::LoginStatus status = GetUserLoginStatus(); 352 ash::LoginStatus status = GetUserLoginStatus();
360 ash::WmShell* wm_shell = ash::WmShell::Get(); 353 ash::WmShell* wm_shell = ash::WmShell::Get();
361 if (status == ash::LoginStatus::NOT_LOGGED_IN || 354 if (status == ash::LoginStatus::NOT_LOGGED_IN ||
362 status == ash::LoginStatus::LOCKED || 355 status == ash::LoginStatus::LOCKED ||
363 wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { 356 wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) {
364 scoped_refptr<chromeos::HelpAppLauncher> help_app( 357 scoped_refptr<chromeos::HelpAppLauncher> help_app(
365 new chromeos::HelpAppLauncher(GetNativeWindow())); 358 new chromeos::HelpAppLauncher(GetNativeWindow()));
366 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE); 359 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE);
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1105 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1113 << "ENABLE_SUPERVISED_USERS undefined."; 1106 << "ENABLE_SUPERVISED_USERS undefined.";
1114 return base::string16(); 1107 return base::string16();
1115 } 1108 }
1116 1109
1117 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1110 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1118 return new SystemTrayDelegateChromeOS(); 1111 return new SystemTrayDelegateChromeOS();
1119 } 1112 }
1120 1113
1121 } // namespace chromeos 1114 } // 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