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

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

Issue 2360143004: mash: Add SystemTrayClient interface, use to show date settings (Closed)
Patch Set: reparent Created 4 years, 2 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "chrome/browser/chromeos/settings/cros_settings.h" 67 #include "chrome/browser/chromeos/settings/cros_settings.h"
68 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" 68 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
69 #include "chrome/browser/lifetime/application_lifetime.h" 69 #include "chrome/browser/lifetime/application_lifetime.h"
70 #include "chrome/browser/profiles/profile_manager.h" 70 #include "chrome/browser/profiles/profile_manager.h"
71 #include "chrome/browser/supervised_user/supervised_user_service.h" 71 #include "chrome/browser/supervised_user/supervised_user_service.h"
72 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 72 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
73 #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h" 73 #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h"
74 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h" 74 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h"
75 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 75 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
76 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h" 76 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h"
77 #include "chrome/browser/ui/ash/system_tray_common.h"
77 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h" 78 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h"
78 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" 79 #include "chrome/browser/ui/ash/volume_controller_chromeos.h"
79 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h" 80 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h"
80 #include "chrome/browser/ui/browser.h" 81 #include "chrome/browser/ui/browser.h"
81 #include "chrome/browser/ui/browser_finder.h" 82 #include "chrome/browser/ui/browser_finder.h"
82 #include "chrome/browser/ui/browser_list.h" 83 #include "chrome/browser/ui/browser_list.h"
83 #include "chrome/browser/ui/chrome_pages.h" 84 #include "chrome/browser/ui/chrome_pages.h"
84 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 85 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
85 #include "chrome/browser/ui/singleton_tabs.h" 86 #include "chrome/browser/ui/singleton_tabs.h"
86 #include "chrome/browser/ui/tabs/tab_strip_model.h" 87 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 ShowSettingsSubPageForActiveUser(""); 423 ShowSettingsSubPageForActiveUser("");
423 } 424 }
424 425
425 bool SystemTrayDelegateChromeOS::ShouldShowSettings() { 426 bool SystemTrayDelegateChromeOS::ShouldShowSettings() {
426 ash::WmShell* wm_shell = ash::WmShell::Get(); 427 ash::WmShell* wm_shell = ash::WmShell::Get();
427 return ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings() && 428 return ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings() &&
428 !wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); 429 !wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
429 } 430 }
430 431
431 void SystemTrayDelegateChromeOS::ShowDateSettings() { 432 void SystemTrayDelegateChromeOS::ShowDateSettings() {
432 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); 433 SystemTrayCommon::ShowDateSettings();
433 std::string sub_page =
434 std::string(chrome::kSearchSubPage) + "#" +
435 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
436 // Everybody can change the time zone (even though it is a device setting).
437 ShowSettingsSubPageForActiveUser(sub_page);
438 } 434 }
439 435
440 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() { 436 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() {
441 SetTimeDialog::ShowDialog(GetNativeWindow()); 437 SetTimeDialog::ShowDialog(GetNativeWindow());
442 } 438 }
443 439
444 void SystemTrayDelegateChromeOS::ShowNetworkSettingsForGuid( 440 void SystemTrayDelegateChromeOS::ShowNetworkSettingsForGuid(
445 const std::string& guid) { 441 const std::string& guid) {
446 ash::WmShell* wm_shell = ash::WmShell::Get(); 442 ash::WmShell* wm_shell = ash::WmShell::Get();
447 if (LoginState::Get()->IsUserLoggedIn() && 443 if (LoginState::Get()->IsUserLoggedIn() &&
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1329 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1334 << "ENABLE_SUPERVISED_USERS undefined."; 1330 << "ENABLE_SUPERVISED_USERS undefined.";
1335 return base::string16(); 1331 return base::string16();
1336 } 1332 }
1337 1333
1338 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1334 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1339 return new SystemTrayDelegateChromeOS(); 1335 return new SystemTrayDelegateChromeOS();
1340 } 1336 }
1341 1337
1342 } // namespace chromeos 1338 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_controller_mus.cc ('k') | chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698