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

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

Issue 9664056: ash uber tray: Add the detailed network popup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 (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 #pragma once 7 #pragma once
8 8
9 #include "ash/system/user/login_status.h" 9 #include "ash/system/user/login_status.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
12 12
13 class SkBitmap; 13 class SkBitmap;
14 14
15 namespace ash { 15 namespace ash {
16 16
17 struct NetworkIconInfo { 17 struct NetworkIconInfo {
18 SkBitmap image; 18 SkBitmap image;
19 string16 name; 19 string16 name;
20 string16 description; 20 string16 description;
21 std::string unique_id;
21 }; 22 };
22 23
23 class SystemTrayDelegate { 24 class SystemTrayDelegate {
24 public: 25 public:
25 virtual ~SystemTrayDelegate() {} 26 virtual ~SystemTrayDelegate() {}
26 27
27 // Gets information about the logged in user. 28 // Gets information about the logged in user.
28 virtual const std::string GetUserDisplayName() const = 0; 29 virtual const std::string GetUserDisplayName() const = 0;
29 virtual const std::string GetUserEmail() const = 0; 30 virtual const std::string GetUserEmail() const = 0;
30 virtual const SkBitmap& GetUserImage() const = 0; 31 virtual const SkBitmap& GetUserImage() const = 0;
31 virtual user::LoginStatus GetUserLoginStatus() const = 0; 32 virtual user::LoginStatus GetUserLoginStatus() const = 0;
32 33
33 // Returns whether a system upgrade is available. 34 // Returns whether a system upgrade is available.
34 virtual bool SystemShouldUpgrade() const = 0; 35 virtual bool SystemShouldUpgrade() const = 0;
35 36
36 // Returns the resource id for the icon to show for the update notification. 37 // Returns the resource id for the icon to show for the update notification.
37 virtual int GetSystemUpdateIconResource() const = 0; 38 virtual int GetSystemUpdateIconResource() const = 0;
38 39
39 // Shows settings. 40 // Shows settings.
40 virtual void ShowSettings() = 0; 41 virtual void ShowSettings() = 0;
41 42
42 // Shows the settings related to date, timezone etc. 43 // Shows the settings related to date, timezone etc.
43 virtual void ShowDateSettings() = 0; 44 virtual void ShowDateSettings() = 0;
44 45
46 // Show the settings related to network.
47 virtual void ShowNetworkSettings() = 0;
48
45 // Shows help. 49 // Shows help.
46 virtual void ShowHelp() = 0; 50 virtual void ShowHelp() = 0;
47 51
48 // Is the system audio muted? 52 // Is the system audio muted?
49 virtual bool IsAudioMuted() const = 0; 53 virtual bool IsAudioMuted() const = 0;
50 54
51 // Mutes/Unmutes the audio system. 55 // Mutes/Unmutes the audio system.
52 virtual void SetAudioMuted(bool muted) = 0; 56 virtual void SetAudioMuted(bool muted) = 0;
53 57
54 // Gets the volume level. 58 // Gets the volume level.
55 virtual float GetVolumeLevel() const = 0; 59 virtual float GetVolumeLevel() const = 0;
56 60
57 // Sets the volume level. 61 // Sets the volume level.
58 virtual void SetVolumeLevel(float level) = 0; 62 virtual void SetVolumeLevel(float level) = 0;
59 63
60 // Attempts to shut down the system. 64 // Attempts to shut down the system.
61 virtual void ShutDown() = 0; 65 virtual void ShutDown() = 0;
62 66
63 // Attempts to sign out the user. 67 // Attempts to sign out the user.
64 virtual void SignOut() = 0; 68 virtual void SignOut() = 0;
65 69
66 // Attempts to lock the screen. 70 // Attempts to lock the screen.
67 virtual void RequestLockScreen() = 0; 71 virtual void RequestLockScreen() = 0;
68 72
69 // Returns information about the most relevant network. Relevance is 73 // Returns information about the most relevant network. Relevance is
70 // determined by the implementor (e.g. a connecting network may be more 74 // determined by the implementor (e.g. a connecting network may be more
71 // relevant over a connected network etc.) 75 // relevant over a connected network etc.)
72 virtual NetworkIconInfo GetMostRelevantNetworkIcon() = 0; 76 virtual NetworkIconInfo GetMostRelevantNetworkIcon(bool large) = 0;
77
78 // Returns information about the available networks.
79 virtual void GetAvailableNetworks(std::vector<NetworkIconInfo>* list) = 0;
80
81 // Connects to the network specified by the unique id.
82 virtual void ConnectToNetwork(const std::string& network_id) = 0;
83
84 // Toggles airplane mode.
85 virtual void ToggleAirplaneMode() = 0;
86
87 // Shows UI for changing proxy settings.
88 virtual void ChangeProxySettings() = 0;
73 }; 89 };
74 90
75 } // namespace ash 91 } // namespace ash
76 92
77 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 93 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698