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

Side by Side Diff: ash/system/tray/system_tray_delegate.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 (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 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/system/user/login_status.h" 12 #include "ash/system/user/login_status.h"
13 #include "ash/volume_control_delegate.h" 13 #include "ash/volume_control_delegate.h"
14 #include "base/callback_forward.h" 14 #include "base/callback_forward.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/i18n/time_formatting.h" 16 #include "base/i18n/time_formatting.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "ui/gfx/image/image_skia.h" 19 #include "ui/gfx/image/image_skia.h"
20 20
21 namespace base { 21 namespace base {
22 class TimeDelta; 22 class TimeDelta;
23 class TimeTicks; 23 class TimeTicks;
24 } 24 }
25 25
26 namespace user_manager {
27 class UserID;
28 }
29
26 namespace ash { 30 namespace ash {
27 31
28 class CustodianInfoTrayObserver; 32 class CustodianInfoTrayObserver;
29 class ShutdownPolicyObserver; 33 class ShutdownPolicyObserver;
30 34
31 struct ASH_EXPORT NetworkIconInfo { 35 struct ASH_EXPORT NetworkIconInfo {
32 NetworkIconInfo(); 36 NetworkIconInfo();
33 ~NetworkIconInfo(); 37 ~NetworkIconInfo();
34 38
35 bool highlight() const { return connected || connecting; } 39 bool highlight() const { return connected || connecting; }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // The active user has been changed. This will be called when the UI is ready 314 // The active user has been changed. This will be called when the UI is ready
311 // to be switched to the new user. 315 // to be switched to the new user.
312 // Note: This will happen after SessionStateObserver::ActiveUserChanged fires. 316 // Note: This will happen after SessionStateObserver::ActiveUserChanged fires.
313 virtual void ActiveUserWasChanged(); 317 virtual void ActiveUserWasChanged();
314 318
315 // Returns true when the Search key is configured to be treated as Caps Lock. 319 // Returns true when the Search key is configured to be treated as Caps Lock.
316 virtual bool IsSearchKeyMappedToCapsLock(); 320 virtual bool IsSearchKeyMappedToCapsLock();
317 321
318 // Returns accounts delegate for given user. May return nullptr. 322 // Returns accounts delegate for given user. May return nullptr.
319 virtual tray::UserAccountsDelegate* GetUserAccountsDelegate( 323 virtual tray::UserAccountsDelegate* GetUserAccountsDelegate(
320 const std::string& user_id); 324 const user_manager::UserID& user_id);
321 325
322 // Adding observers that are notified when supervised info is being changed. 326 // Adding observers that are notified when supervised info is being changed.
323 virtual void AddCustodianInfoTrayObserver( 327 virtual void AddCustodianInfoTrayObserver(
324 CustodianInfoTrayObserver* observer); 328 CustodianInfoTrayObserver* observer);
325 329
326 virtual void RemoveCustodianInfoTrayObserver( 330 virtual void RemoveCustodianInfoTrayObserver(
327 CustodianInfoTrayObserver* observer); 331 CustodianInfoTrayObserver* observer);
328 332
329 // Adds an observer whose |OnShutdownPolicyChanged| function is called when 333 // Adds an observer whose |OnShutdownPolicyChanged| function is called when
330 // the |DeviceRebootOnShutdown| policy changes. If this policy is set to 334 // the |DeviceRebootOnShutdown| policy changes. If this policy is set to
331 // true, a device cannot be shut down anymore but only rebooted. 335 // true, a device cannot be shut down anymore but only rebooted.
332 virtual void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer); 336 virtual void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer);
333 337
334 virtual void RemoveShutdownPolicyObserver(ShutdownPolicyObserver* observer); 338 virtual void RemoveShutdownPolicyObserver(ShutdownPolicyObserver* observer);
335 339
336 // Determines whether the device is automatically rebooted when shut down as 340 // Determines whether the device is automatically rebooted when shut down as
337 // specified by the device policy |DeviceRebootOnShutdown|. This function 341 // specified by the device policy |DeviceRebootOnShutdown|. This function
338 // asynchronously calls |callback| once a trusted policy becomes available. 342 // asynchronously calls |callback| once a trusted policy becomes available.
339 virtual void ShouldRebootOnShutdown(const RebootOnShutdownCallback& callback); 343 virtual void ShouldRebootOnShutdown(const RebootOnShutdownCallback& callback);
340 344
341 // Returns VPNDelegate. May return nullptr. 345 // Returns VPNDelegate. May return nullptr.
342 virtual VPNDelegate* GetVPNDelegate() const; 346 virtual VPNDelegate* GetVPNDelegate() const;
343 }; 347 };
344 348
345 } // namespace ash 349 } // namespace ash
346 350
347 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 351 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698