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

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

Issue 247663003: Date and Time dialog for when the clock isn't synced. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Browser tests Created 6 years, 8 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 | Annotate | Revision Log
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "chrome/browser/chromeos/login/login_wizard.h" 60 #include "chrome/browser/chromeos/login/login_wizard.h"
61 #include "chrome/browser/chromeos/login/supervised_user_manager.h" 61 #include "chrome/browser/chromeos/login/supervised_user_manager.h"
62 #include "chrome/browser/chromeos/login/user.h" 62 #include "chrome/browser/chromeos/login/user.h"
63 #include "chrome/browser/chromeos/login/user_adding_screen.h" 63 #include "chrome/browser/chromeos/login/user_adding_screen.h"
64 #include "chrome/browser/chromeos/login/user_manager.h" 64 #include "chrome/browser/chromeos/login/user_manager.h"
65 #include "chrome/browser/chromeos/net/network_portal_detector.h" 65 #include "chrome/browser/chromeos/net/network_portal_detector.h"
66 #include "chrome/browser/chromeos/options/network_config_view.h" 66 #include "chrome/browser/chromeos/options/network_config_view.h"
67 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 67 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
68 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 68 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
69 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" 69 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
70 #include "chrome/browser/chromeos/set_time_dialog.h"
70 #include "chrome/browser/chromeos/settings/cros_settings.h" 71 #include "chrome/browser/chromeos/settings/cros_settings.h"
71 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 72 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
72 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" 73 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
73 #include "chrome/browser/drive/drive_service_interface.h" 74 #include "chrome/browser/drive/drive_service_interface.h"
74 #include "chrome/browser/feedback/tracing_manager.h" 75 #include "chrome/browser/feedback/tracing_manager.h"
75 #include "chrome/browser/google/google_util.h" 76 #include "chrome/browser/google/google_util.h"
76 #include "chrome/browser/lifetime/application_lifetime.h" 77 #include "chrome/browser/lifetime/application_lifetime.h"
77 #include "chrome/browser/profiles/profile_manager.h" 78 #include "chrome/browser/profiles/profile_manager.h"
78 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 79 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
79 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h" 80 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 void SystemTrayDelegateChromeOS::ShowSettings() { 468 void SystemTrayDelegateChromeOS::ShowSettings() {
468 ShowSettingsSubPageForActiveUser(""); 469 ShowSettingsSubPageForActiveUser("");
469 } 470 }
470 471
471 bool SystemTrayDelegateChromeOS::ShouldShowSettings() { 472 bool SystemTrayDelegateChromeOS::ShouldShowSettings() {
472 return UserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings(); 473 return UserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings();
473 } 474 }
474 475
475 void SystemTrayDelegateChromeOS::ShowDateSettings() { 476 void SystemTrayDelegateChromeOS::ShowDateSettings() {
476 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); 477 content::RecordAction(base::UserMetricsAction("ShowDateOptions"));
478
479 // Everybody can change the time and time zone (even though they are
480 // device settings).
481 if (GetUserLoginStatus() == ash::user::LOGGED_IN_NONE) {
482 SetTimeDialog::ShowDialog(GetNativeWindow());
Daniel Erat 2014/04/24 19:49:59 this method seems like a strange place to call thi
michaelpg 2014/04/24 20:37:12 I've added a separate method and updated DateView
483 return;
484 }
485
477 std::string sub_page = 486 std::string sub_page =
478 std::string(chrome::kSearchSubPage) + "#" + 487 std::string(chrome::kSearchSubPage) + "#" +
479 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); 488 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
480 // Everybody can change the time zone (even though it is a device setting).
481 ShowSettingsSubPageForActiveUser(sub_page); 489 ShowSettingsSubPageForActiveUser(sub_page);
482 } 490 }
483 491
484 void SystemTrayDelegateChromeOS::ShowNetworkSettings( 492 void SystemTrayDelegateChromeOS::ShowNetworkSettings(
485 const std::string& service_path) { 493 const std::string& service_path) {
486 if (!LoginState::Get()->IsUserLoggedIn()) 494 if (!LoginState::Get()->IsUserLoggedIn())
487 return; 495 return;
488 ShowNetworkSettingsPage(service_path); 496 ShowNetworkSettingsPage(service_path);
489 } 497 }
490 498
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 accessibility_subscription_.reset(); 1419 accessibility_subscription_.reset();
1412 else 1420 else
1413 OnAccessibilityModeChanged(details.notify); 1421 OnAccessibilityModeChanged(details.notify);
1414 } 1422 }
1415 1423
1416 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1424 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1417 return new SystemTrayDelegateChromeOS(); 1425 return new SystemTrayDelegateChromeOS();
1418 } 1426 }
1419 1427
1420 } // namespace chromeos 1428 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698