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

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: Changed "managed by" to "owned by" as requested offline. Created 8 years 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 return ash::user::LOGGED_IN_OWNER; 286 return ash::user::LOGGED_IN_OWNER;
286 if (manager->IsLoggedInAsGuest()) 287 if (manager->IsLoggedInAsGuest())
287 return ash::user::LOGGED_IN_GUEST; 288 return ash::user::LOGGED_IN_GUEST;
288 if (manager->IsLoggedInAsDemoUser()) 289 if (manager->IsLoggedInAsDemoUser())
289 return ash::user::LOGGED_IN_KIOSK; 290 return ash::user::LOGGED_IN_KIOSK;
290 if (manager->IsLoggedInAsPublicAccount()) 291 if (manager->IsLoggedInAsPublicAccount())
291 return ash::user::LOGGED_IN_PUBLIC; 292 return ash::user::LOGGED_IN_PUBLIC;
292 return ash::user::LOGGED_IN_USER; 293 return ash::user::LOGGED_IN_USER;
293 } 294 }
294 295
296 virtual const std::string GetEnterpriseDomain() const OVERRIDE {
297 return g_browser_process->browser_policy_connector()->GetEnterpriseDomain();
298 }
299
295 virtual bool SystemShouldUpgrade() const OVERRIDE { 300 virtual bool SystemShouldUpgrade() const OVERRIDE {
296 return UpgradeDetector::GetInstance()->notify_upgrade(); 301 return UpgradeDetector::GetInstance()->notify_upgrade();
297 } 302 }
298 303
299 virtual base::HourClockType GetHourClockType() const OVERRIDE { 304 virtual base::HourClockType GetHourClockType() const OVERRIDE {
300 return clock_type_; 305 return clock_type_;
301 } 306 }
302 307
303 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { 308 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE {
304 return power_supply_status_; 309 return power_supply_status_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 content::RecordAction( 353 content::RecordAction(
349 content::UserMetricsAction("OpenLanguageOptionsDialog")); 354 content::UserMetricsAction("OpenLanguageOptionsDialog"));
350 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), 355 chrome::ShowSettingsSubPage(GetAppropriateBrowser(),
351 chrome::kLanguageOptionsSubPage); 356 chrome::kLanguageOptionsSubPage);
352 } 357 }
353 358
354 virtual void ShowHelp() OVERRIDE { 359 virtual void ShowHelp() OVERRIDE {
355 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU); 360 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU);
356 } 361 }
357 362
363 virtual void ShowPublicAccountInfo() OVERRIDE {
364 chrome::ShowPolicy(GetAppropriateBrowser());
365 }
366
358 virtual void ShutDown() OVERRIDE { 367 virtual void ShutDown() OVERRIDE {
359 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown(); 368 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown();
360 } 369 }
361 370
362 virtual void SignOut() OVERRIDE { 371 virtual void SignOut() OVERRIDE {
363 browser::AttemptUserExit(); 372 browser::AttemptUserExit();
364 } 373 }
365 374
366 virtual void RequestLockScreen() OVERRIDE { 375 virtual void RequestLockScreen() OVERRIDE {
367 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); 376 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen();
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1281 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1273 }; 1282 };
1274 1283
1275 } // namespace 1284 } // namespace
1276 1285
1277 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1286 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1278 return new chromeos::SystemTrayDelegate(); 1287 return new chromeos::SystemTrayDelegate();
1279 } 1288 }
1280 1289
1281 } // namespace chromeos 1290 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698