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

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

Issue 357323002: Tray elements behave appropriately on the multiple signin screen (more like lock screen) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stored result of check on multiple signin screen to local variable Created 6 years, 4 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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 // Everybody can change the time zone (even though it is a device setting). 481 // Everybody can change the time zone (even though it is a device setting).
482 ShowSettingsSubPageForActiveUser(sub_page); 482 ShowSettingsSubPageForActiveUser(sub_page);
483 } 483 }
484 484
485 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() { 485 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() {
486 SetTimeDialog::ShowDialog(GetNativeWindow()); 486 SetTimeDialog::ShowDialog(GetNativeWindow());
487 } 487 }
488 488
489 void SystemTrayDelegateChromeOS::ShowNetworkSettings( 489 void SystemTrayDelegateChromeOS::ShowNetworkSettings(
490 const std::string& service_path) { 490 const std::string& service_path) {
491 if (!LoginState::Get()->IsUserLoggedIn()) 491 bool userAddingRunning =
492 (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
493 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
494
495 if (!LoginState::Get()->IsUserLoggedIn() || userAddingRunning)
492 return; 496 return;
493 ShowNetworkSettingsPage(service_path); 497 ShowNetworkSettingsPage(service_path);
494 } 498 }
495 499
496 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() { 500 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() {
497 // TODO(sad): Make this work. 501 // TODO(sad): Make this work.
498 } 502 }
499 503
500 void SystemTrayDelegateChromeOS::ShowDisplaySettings() { 504 void SystemTrayDelegateChromeOS::ShowDisplaySettings() {
501 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions")); 505 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions"));
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 chrome::ShowPolicy(displayer.browser()); 577 chrome::ShowPolicy(displayer.browser());
574 } 578 }
575 579
576 void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() { 580 void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() {
577 // TODO(antrim): find out what should we show in this case. 581 // TODO(antrim): find out what should we show in this case.
578 // http://crbug.com/229762 582 // http://crbug.com/229762
579 } 583 }
580 584
581 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() { 585 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() {
582 ash::user::LoginStatus status = GetUserLoginStatus(); 586 ash::user::LoginStatus status = GetUserLoginStatus();
587 bool userAddingRunning =
588 (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
589 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
590
583 if (status == ash::user::LOGGED_IN_NONE || 591 if (status == ash::user::LOGGED_IN_NONE ||
584 status == ash::user::LOGGED_IN_LOCKED) { 592 status == ash::user::LOGGED_IN_LOCKED || userAddingRunning) {
585 scoped_refptr<chromeos::HelpAppLauncher> help_app( 593 scoped_refptr<chromeos::HelpAppLauncher> help_app(
586 new chromeos::HelpAppLauncher(GetNativeWindow())); 594 new chromeos::HelpAppLauncher(GetNativeWindow()));
587 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE); 595 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE);
588 } else { 596 } else {
589 chrome::ScopedTabbedBrowserDisplayer displayer( 597 chrome::ScopedTabbedBrowserDisplayer displayer(
590 ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); 598 ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH);
591 chrome::ShowSingletonTab(displayer.browser(), 599 chrome::ShowSingletonTab(displayer.browser(),
592 GURL(chrome::kLearnMoreEnterpriseURL)); 600 GURL(chrome::kLearnMoreEnterpriseURL));
593 } 601 }
594 } 602 }
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 accessibility_subscription_.reset(); 1405 accessibility_subscription_.reset();
1398 else 1406 else
1399 OnAccessibilityModeChanged(details.notify); 1407 OnAccessibilityModeChanged(details.notify);
1400 } 1408 }
1401 1409
1402 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1410 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1403 return new SystemTrayDelegateChromeOS(); 1411 return new SystemTrayDelegateChromeOS();
1404 } 1412 }
1405 1413
1406 } // namespace chromeos 1414 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698