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

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

Issue 2338103002: CrOS MD - use vectorized icons for ethernet and VPN. (Closed)
Patch Set: 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"
(...skipping 16 matching lines...) Expand all
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 connected network type. 37 // Gets the fulls strength image for a wifi network.
38 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForConnectedNetwork( 38 // TODO(estade): Expose SignalStrengthImageSource and use that instead.
39 IconType icon_type, 39 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForConnectedWifiNetwork();
40 const std::string& network_type);
41 40
42 // Gets the image for a connecting network type. 41 // Gets the disconnected image for a cell network.
43 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForConnectingNetwork( 42 // TODO(estade): Expose SignalStrengthImageSource and use that instead.
44 IconType icon_type, 43 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForDisconnectedCellNetwork();
45 const std::string& network_type);
46 44
47 // Gets the image for a disconnected network type. 45 // Returns a vpn image suitable for use on a light background.
48 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForDisconnectedNetwork( 46 UI_CHROMEOS_EXPORT gfx::ImageSkia GetVpnImage();
49 IconType icon_type,
50 const std::string& network_type);
51 47
52 // Returns the label for |network| based on |icon_type|. |network| can be NULL. 48 // Returns the label for |network| based on |icon_type|. |network| can be NULL.
53 UI_CHROMEOS_EXPORT base::string16 GetLabelForNetwork( 49 UI_CHROMEOS_EXPORT base::string16 GetLabelForNetwork(
54 const chromeos::NetworkState* network, 50 const chromeos::NetworkState* network,
55 IconType icon_type); 51 IconType icon_type);
56 52
57 // Updates and returns the appropriate message id if the cellular network 53 // Updates and returns the appropriate message id if the cellular network
58 // is uninitialized. 54 // is uninitialized.
59 UI_CHROMEOS_EXPORT int GetCellularUninitializedMsg(); 55 UI_CHROMEOS_EXPORT int GetCellularUninitializedMsg();
60 56
61 // Gets the correct icon and label for |icon_type|. Also sets |animating| 57 // Gets the correct icon and label for |icon_type|. Also sets |animating|
62 // based on whether or not the icon is animating (i.e. connecting). 58 // based on whether or not the icon is animating (i.e. connecting).
63 UI_CHROMEOS_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type, 59 UI_CHROMEOS_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type,
64 gfx::ImageSkia* image, 60 gfx::ImageSkia* image,
65 base::string16* label, 61 base::string16* label,
66 bool* animating); 62 bool* animating);
67 63
68 // Called when the list of networks changes. Retreives the list of networks 64 // Called when the list of networks changes. Retreives the list of networks
69 // from the global NetworkStateHandler instance and removes cached entries 65 // from the global NetworkStateHandler instance and removes cached entries
70 // that are no longer in the list. 66 // that are no longer in the list.
71 UI_CHROMEOS_EXPORT void PurgeNetworkIconCache(); 67 UI_CHROMEOS_EXPORT void PurgeNetworkIconCache();
72 68
73 } // namespace network_icon 69 } // namespace network_icon
74 } // namespace ui 70 } // namespace ui
75 71
76 #endif // UI_CHROMEOS_NETWORK_NETWORK_ICON_H_ 72 #endif // UI_CHROMEOS_NETWORK_NETWORK_ICON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698