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

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

Issue 2441133002: mash: Introduce ShowWebDialogWithContainer for webui dialogs (Closed)
Patch Set: private constructor 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 GetUpdateInfo(UpgradeDetector::GetInstance(), info); 342 GetUpdateInfo(UpgradeDetector::GetInstance(), info);
343 } 343 }
344 344
345 bool SystemTrayDelegateChromeOS::ShouldShowSettings() { 345 bool SystemTrayDelegateChromeOS::ShouldShowSettings() {
346 ash::WmShell* wm_shell = ash::WmShell::Get(); 346 ash::WmShell* wm_shell = ash::WmShell::Get();
347 return ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings() && 347 return ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings() &&
348 !wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); 348 !wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
349 } 349 }
350 350
351 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() { 351 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() {
352 // TODO(mash): Refactor out GetNativeWindow and move to SystemTrayClient. 352 // TODO(mash): Move to SystemTrayClient.
353 SetTimeDialog::ShowDialog(GetNativeWindow()); 353 SetTimeDialog::ShowDialogInContainer(
354 SystemTrayClient::GetDialogParentContainerId());
354 } 355 }
355 356
356 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() { 357 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() {
357 // TODO(mash): Refactor out SessionStateDelegate and move to SystemTrayClient. 358 // TODO(mash): Refactor out SessionStateDelegate and move to SystemTrayClient.
358 ash::LoginStatus status = GetUserLoginStatus(); 359 ash::LoginStatus status = GetUserLoginStatus();
359 ash::WmShell* wm_shell = ash::WmShell::Get(); 360 ash::WmShell* wm_shell = ash::WmShell::Get();
360 if (status == ash::LoginStatus::NOT_LOGGED_IN || 361 if (status == ash::LoginStatus::NOT_LOGGED_IN ||
361 status == ash::LoginStatus::LOCKED || 362 status == ash::LoginStatus::LOCKED ||
362 wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { 363 wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) {
363 scoped_refptr<chromeos::HelpAppLauncher> help_app( 364 scoped_refptr<chromeos::HelpAppLauncher> help_app(
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1112 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1112 << "ENABLE_SUPERVISED_USERS undefined."; 1113 << "ENABLE_SUPERVISED_USERS undefined.";
1113 return base::string16(); 1114 return base::string16();
1114 } 1115 }
1115 1116
1116 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1117 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1117 return new SystemTrayDelegateChromeOS(); 1118 return new SystemTrayDelegateChromeOS();
1118 } 1119 }
1119 1120
1120 } // namespace chromeos 1121 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698