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

Side by Side Diff: ui/chromeos/network/network_icon.h

Issue 2342793005: [ash-md] Adds Wi-Fi header row to system tray network detailed view (Closed)
Patch Set: [ash-md] Materializes system tray network detailed view Created 4 years, 3 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 UI_CHROMEOS_NETWORK_NETWORK_ICON_H_ 5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_ICON_H_
6 #define UI_CHROMEOS_NETWORK_NETWORK_ICON_H_ 6 #define UI_CHROMEOS_NETWORK_NETWORK_ICON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/chromeos/ui_chromeos_export.h" 11 #include "ui/chromeos/ui_chromeos_export.h"
12 #include "ui/gfx/image/image_skia.h" 12 #include "ui/gfx/image/image_skia.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 class NetworkState; 15 class NetworkState;
16 } 16 }
17 17
18 namespace ui { 18 namespace ui {
19 namespace network_icon { 19 namespace network_icon {
20 20
21 class AnimationObserver; 21 class AnimationObserver;
22 22
23 // Type of icon which dictates color theme and VPN badging 23 // Type of icon which dictates color theme and VPN badging
24 enum IconType { 24 enum IconType {
25 ICON_TYPE_TRAY, // light icons with VPN badges 25 ICON_TYPE_TRAY, // light icons with VPN badges
26 ICON_TYPE_DEFAULT_VIEW, // dark icons with VPN badges 26 ICON_TYPE_DEFAULT_VIEW, // dark icons with VPN badges
27 ICON_TYPE_LIST, // dark icons without VPN badges 27 ICON_TYPE_LIST, // dark icons without VPN badges
28 }; 28 };
29 29
30 // Gets the image for the network associated with |service_path|. |network| must 30 // Gets the image for the network associated with |service_path|. |network| must
31 // not be NULL. |icon_type| determines the color theme and whether or not to 31 // not be NULL. |icon_type| determines the color theme and whether or not to
32 // show the VPN badge. This caches badged icons per network per |icon_type|. 32 // show the VPN badge. This caches badged icons per network per |icon_type|.
33 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForNetwork( 33 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForNetwork(
34 const chromeos::NetworkState* network, 34 const chromeos::NetworkState* network,
35 IconType icon_type); 35 IconType icon_type);
36 36
37 // Gets the fulls strength image for a wifi network. 37 // Gets the fulls strength image for a wifi network.
38 // TODO(estade): Expose SignalStrengthImageSource and use that instead. 38 // TODO(estade): Expose SignalStrengthImageSource and use that instead.
39 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForConnectedMobileNetwork(); 39 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForConnectedMobileNetwork();
40 40
41 // Gets the disconnected image for a cell network. 41 // Gets the disconnected image for a cell network.
42 // TODO(estade): Expose SignalStrengthImageSource and use that instead. 42 // TODO(estade): Expose SignalStrengthImageSource and use that instead.
43 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForDisconnectedCellNetwork(); 43 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForDisconnectedCellNetwork();
44 44
45 // Gets the disconnected image for a Wi-Fi network.
tdanderson 2016/09/20 14:44:33 Update comment.
varkha 2016/09/23 00:35:53 Done.
46 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForHeaderWifiNetwork(SkColor color);
47
45 // Returns a vpn image suitable for use on a light background. 48 // Returns a vpn image suitable for use on a light background.
46 UI_CHROMEOS_EXPORT gfx::ImageSkia GetVpnImage(); 49 UI_CHROMEOS_EXPORT gfx::ImageSkia GetVpnImage();
47 50
48 // Returns the label for |network| based on |icon_type|. |network| can be NULL. 51 // Returns the label for |network| based on |icon_type|. |network| can be NULL.
49 UI_CHROMEOS_EXPORT base::string16 GetLabelForNetwork( 52 UI_CHROMEOS_EXPORT base::string16 GetLabelForNetwork(
50 const chromeos::NetworkState* network, 53 const chromeos::NetworkState* network,
51 IconType icon_type); 54 IconType icon_type);
52 55
53 // Updates and returns the appropriate message id if the cellular network 56 // Updates and returns the appropriate message id if the cellular network
54 // is uninitialized. 57 // is uninitialized.
55 UI_CHROMEOS_EXPORT int GetCellularUninitializedMsg(); 58 UI_CHROMEOS_EXPORT int GetCellularUninitializedMsg();
56 59
57 // Gets the correct icon and label for |icon_type|. Also sets |animating| 60 // Gets the correct icon and label for |icon_type|. Also sets |animating|
58 // based on whether or not the icon is animating (i.e. connecting). 61 // based on whether or not the icon is animating (i.e. connecting).
59 UI_CHROMEOS_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type, 62 UI_CHROMEOS_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type,
60 gfx::ImageSkia* image, 63 gfx::ImageSkia* image,
61 base::string16* label, 64 base::string16* label,
62 bool* animating); 65 bool* animating);
63 66
64 // Called when the list of networks changes. Retreives the list of networks 67 // Called when the list of networks changes. Retreives the list of networks
65 // from the global NetworkStateHandler instance and removes cached entries 68 // from the global NetworkStateHandler instance and removes cached entries
66 // that are no longer in the list. 69 // that are no longer in the list.
67 UI_CHROMEOS_EXPORT void PurgeNetworkIconCache(); 70 UI_CHROMEOS_EXPORT void PurgeNetworkIconCache();
68 71
69 } // namespace network_icon 72 } // namespace network_icon
70 } // namespace ui 73 } // namespace ui
71 74
72 #endif // UI_CHROMEOS_NETWORK_NETWORK_ICON_H_ 75 #endif // UI_CHROMEOS_NETWORK_NETWORK_ICON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698