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

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: 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "chrome/browser/chromeos/login/user.h" 45 #include "chrome/browser/chromeos/login/user.h"
46 #include "chrome/browser/chromeos/login/user_manager.h" 46 #include "chrome/browser/chromeos/login/user_manager.h"
47 #include "chrome/browser/chromeos/mobile_config.h" 47 #include "chrome/browser/chromeos/mobile_config.h"
48 #include "chrome/browser/chromeos/status/data_promo_notification.h" 48 #include "chrome/browser/chromeos/status/data_promo_notification.h"
49 #include "chrome/browser/chromeos/status/network_menu.h" 49 #include "chrome/browser/chromeos/status/network_menu.h"
50 #include "chrome/browser/chromeos/status/network_menu_icon.h" 50 #include "chrome/browser/chromeos/status/network_menu_icon.h"
51 #include "chrome/browser/chromeos/system/timezone_settings.h" 51 #include "chrome/browser/chromeos/system/timezone_settings.h"
52 #include "chrome/browser/chromeos/system_key_event_listener.h" 52 #include "chrome/browser/chromeos/system_key_event_listener.h"
53 #include "chrome/browser/google_apis/drive_service_interface.h" 53 #include "chrome/browser/google_apis/drive_service_interface.h"
54 #include "chrome/browser/lifetime/application_lifetime.h" 54 #include "chrome/browser/lifetime/application_lifetime.h"
55 #include "chrome/browser/policy/browser_policy_connector.h"
55 #include "chrome/browser/prefs/pref_service.h" 56 #include "chrome/browser/prefs/pref_service.h"
56 #include "chrome/browser/profiles/profile_manager.h" 57 #include "chrome/browser/profiles/profile_manager.h"
57 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" 58 #include "chrome/browser/ui/ash/volume_controller_chromeos.h"
58 #include "chrome/browser/ui/browser.h" 59 #include "chrome/browser/ui/browser.h"
59 #include "chrome/browser/ui/browser_finder.h" 60 #include "chrome/browser/ui/browser_finder.h"
60 #include "chrome/browser/ui/chrome_pages.h" 61 #include "chrome/browser/ui/chrome_pages.h"
61 #include "chrome/browser/ui/host_desktop.h" 62 #include "chrome/browser/ui/host_desktop.h"
62 #include "chrome/browser/ui/singleton_tabs.h" 63 #include "chrome/browser/ui/singleton_tabs.h"
63 #include "chrome/browser/upgrade_detector.h" 64 #include "chrome/browser/upgrade_detector.h"
64 #include "chrome/common/chrome_notification_types.h" 65 #include "chrome/common/chrome_notification_types.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return ash::user::LOGGED_IN_OWNER; 283 return ash::user::LOGGED_IN_OWNER;
283 if (manager->IsLoggedInAsGuest()) 284 if (manager->IsLoggedInAsGuest())
284 return ash::user::LOGGED_IN_GUEST; 285 return ash::user::LOGGED_IN_GUEST;
285 if (manager->IsLoggedInAsDemoUser()) 286 if (manager->IsLoggedInAsDemoUser())
286 return ash::user::LOGGED_IN_KIOSK; 287 return ash::user::LOGGED_IN_KIOSK;
287 if (manager->IsLoggedInAsPublicAccount()) 288 if (manager->IsLoggedInAsPublicAccount())
288 return ash::user::LOGGED_IN_PUBLIC; 289 return ash::user::LOGGED_IN_PUBLIC;
289 return ash::user::LOGGED_IN_USER; 290 return ash::user::LOGGED_IN_USER;
290 } 291 }
291 292
293 virtual const std::string GetEnterpriseDomain() const OVERRIDE {
294 return g_browser_process->browser_policy_connector()->GetEnterpriseDomain();
295 }
296
292 virtual bool SystemShouldUpgrade() const OVERRIDE { 297 virtual bool SystemShouldUpgrade() const OVERRIDE {
293 return UpgradeDetector::GetInstance()->notify_upgrade(); 298 return UpgradeDetector::GetInstance()->notify_upgrade();
294 } 299 }
295 300
296 virtual base::HourClockType GetHourClockType() const OVERRIDE { 301 virtual base::HourClockType GetHourClockType() const OVERRIDE {
297 return clock_type_; 302 return clock_type_;
298 } 303 }
299 304
300 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { 305 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE {
301 return power_supply_status_; 306 return power_supply_status_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 content::RecordAction( 350 content::RecordAction(
346 content::UserMetricsAction("OpenLanguageOptionsDialog")); 351 content::UserMetricsAction("OpenLanguageOptionsDialog"));
347 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), 352 chrome::ShowSettingsSubPage(GetAppropriateBrowser(),
348 chrome::kLanguageOptionsSubPage); 353 chrome::kLanguageOptionsSubPage);
349 } 354 }
350 355
351 virtual void ShowHelp() OVERRIDE { 356 virtual void ShowHelp() OVERRIDE {
352 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU); 357 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU);
353 } 358 }
354 359
360 virtual void ShowPublicAccountInfo() OVERRIDE {
361 chrome::ShowPolicy(GetAppropriateBrowser());
362 }
363
355 virtual void ShutDown() OVERRIDE { 364 virtual void ShutDown() OVERRIDE {
356 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); 365 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
357 if (!base::chromeos::IsRunningOnChromeOS()) 366 if (!base::chromeos::IsRunningOnChromeOS())
358 browser::AttemptUserExit(); 367 browser::AttemptUserExit();
359 } 368 }
360 369
361 virtual void SignOut() OVERRIDE { 370 virtual void SignOut() OVERRIDE {
362 browser::AttemptUserExit(); 371 browser::AttemptUserExit();
363 } 372 }
364 373
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1336 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1328 }; 1337 };
1329 1338
1330 } // namespace 1339 } // namespace
1331 1340
1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1341 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1333 return new chromeos::SystemTrayDelegate(); 1342 return new chromeos::SystemTrayDelegate();
1334 } 1343 }
1335 1344
1336 } // namespace chromeos 1345 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698