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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 11377133: Customize user details in ash system bubble for public account mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Massively overhauled and redone implementation. Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/audio/audio_observer.h" 9 #include "ash/system/audio/audio_observer.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 10 #include "ash/system/bluetooth/bluetooth_observer.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/browser/chromeos/login/user.h" 46 #include "chrome/browser/chromeos/login/user.h"
47 #include "chrome/browser/chromeos/login/user_manager.h" 47 #include "chrome/browser/chromeos/login/user_manager.h"
48 #include "chrome/browser/chromeos/mobile_config.h" 48 #include "chrome/browser/chromeos/mobile_config.h"
49 #include "chrome/browser/chromeos/status/data_promo_notification.h" 49 #include "chrome/browser/chromeos/status/data_promo_notification.h"
50 #include "chrome/browser/chromeos/status/network_menu.h" 50 #include "chrome/browser/chromeos/status/network_menu.h"
51 #include "chrome/browser/chromeos/status/network_menu_icon.h" 51 #include "chrome/browser/chromeos/status/network_menu_icon.h"
52 #include "chrome/browser/chromeos/system/timezone_settings.h" 52 #include "chrome/browser/chromeos/system/timezone_settings.h"
53 #include "chrome/browser/chromeos/system_key_event_listener.h" 53 #include "chrome/browser/chromeos/system_key_event_listener.h"
54 #include "chrome/browser/google_apis/drive_service_interface.h" 54 #include "chrome/browser/google_apis/drive_service_interface.h"
55 #include "chrome/browser/lifetime/application_lifetime.h" 55 #include "chrome/browser/lifetime/application_lifetime.h"
56 #include "chrome/browser/policy/browser_policy_connector.h"
56 #include "chrome/browser/prefs/pref_service.h" 57 #include "chrome/browser/prefs/pref_service.h"
57 #include "chrome/browser/profiles/profile_manager.h" 58 #include "chrome/browser/profiles/profile_manager.h"
58 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" 59 #include "chrome/browser/ui/ash/volume_controller_chromeos.h"
59 #include "chrome/browser/ui/browser.h" 60 #include "chrome/browser/ui/browser.h"
60 #include "chrome/browser/ui/browser_finder.h" 61 #include "chrome/browser/ui/browser_finder.h"
61 #include "chrome/browser/ui/chrome_pages.h" 62 #include "chrome/browser/ui/chrome_pages.h"
62 #include "chrome/browser/ui/host_desktop.h" 63 #include "chrome/browser/ui/host_desktop.h"
63 #include "chrome/browser/ui/singleton_tabs.h" 64 #include "chrome/browser/ui/singleton_tabs.h"
64 #include "chrome/browser/upgrade_detector.h" 65 #include "chrome/browser/upgrade_detector.h"
65 #include "chrome/common/chrome_notification_types.h" 66 #include "chrome/common/chrome_notification_types.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return ash::user::LOGGED_IN_OWNER; 285 return ash::user::LOGGED_IN_OWNER;
285 if (manager->IsLoggedInAsGuest()) 286 if (manager->IsLoggedInAsGuest())
286 return ash::user::LOGGED_IN_GUEST; 287 return ash::user::LOGGED_IN_GUEST;
287 if (manager->IsLoggedInAsDemoUser()) 288 if (manager->IsLoggedInAsDemoUser())
288 return ash::user::LOGGED_IN_KIOSK; 289 return ash::user::LOGGED_IN_KIOSK;
289 if (manager->IsLoggedInAsPublicAccount()) 290 if (manager->IsLoggedInAsPublicAccount())
290 return ash::user::LOGGED_IN_PUBLIC; 291 return ash::user::LOGGED_IN_PUBLIC;
291 return ash::user::LOGGED_IN_USER; 292 return ash::user::LOGGED_IN_USER;
292 } 293 }
293 294
295 virtual const std::string GetEnterpriseDomain() const OVERRIDE {
296 return g_browser_process->browser_policy_connector()->GetEnterpriseDomain();
297 }
298
294 virtual bool SystemShouldUpgrade() const OVERRIDE { 299 virtual bool SystemShouldUpgrade() const OVERRIDE {
295 return UpgradeDetector::GetInstance()->notify_upgrade(); 300 return UpgradeDetector::GetInstance()->notify_upgrade();
296 } 301 }
297 302
298 virtual base::HourClockType GetHourClockType() const OVERRIDE { 303 virtual base::HourClockType GetHourClockType() const OVERRIDE {
299 return clock_type_; 304 return clock_type_;
300 } 305 }
301 306
302 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { 307 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE {
303 return power_supply_status_; 308 return power_supply_status_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 content::RecordAction( 352 content::RecordAction(
348 content::UserMetricsAction("OpenLanguageOptionsDialog")); 353 content::UserMetricsAction("OpenLanguageOptionsDialog"));
349 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), 354 chrome::ShowSettingsSubPage(GetAppropriateBrowser(),
350 chrome::kLanguageOptionsSubPage); 355 chrome::kLanguageOptionsSubPage);
351 } 356 }
352 357
353 virtual void ShowHelp() OVERRIDE { 358 virtual void ShowHelp() OVERRIDE {
354 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU); 359 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU);
355 } 360 }
356 361
362 virtual void ShowPublicAccountInfo() OVERRIDE {
363 chrome::ShowPolicy(GetAppropriateBrowser());
364 }
365
357 virtual void ShutDown() OVERRIDE { 366 virtual void ShutDown() OVERRIDE {
358 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown(); 367 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown();
359 } 368 }
360 369
361 virtual void SignOut() OVERRIDE { 370 virtual void SignOut() OVERRIDE {
362 browser::AttemptUserExit(); 371 browser::AttemptUserExit();
363 } 372 }
364 373
365 virtual void RequestLockScreen() OVERRIDE { 374 virtual void RequestLockScreen() OVERRIDE {
366 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); 375 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen();
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1285 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1277 }; 1286 };
1278 1287
1279 } // namespace 1288 } // namespace
1280 1289
1281 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1290 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1282 return new chromeos::SystemTrayDelegate(); 1291 return new chromeos::SystemTrayDelegate();
1283 } 1292 }
1284 1293
1285 } // namespace chromeos 1294 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698