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

Side by Side Diff: ash/common/system/chromeos/network/network_icon.h

Issue 2784133002: Cros system menu - Use WiFi strike-through image for "No networks" row (Closed)
Patch Set: docs Created 3 years, 8 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
« no previous file with comments | « no previous file | ash/common/system/chromeos/network/network_icon.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 15 matching lines...) Expand all
26 ICON_TYPE_MENU_LIST, // dark icons without VPN badges; separate status 26 ICON_TYPE_MENU_LIST, // dark icons without VPN badges; separate status
27 }; 27 };
28 28
29 // Gets the image for provided |network|. |network| must not be NULL. 29 // Gets the image for provided |network|. |network| must not be NULL.
30 // |icon_type| determines the color theme and whether or not to show the VPN 30 // |icon_type| determines the color theme and whether or not to show the VPN
31 // badge. This caches badged icons per network per |icon_type|. 31 // badge. This caches badged icons per network per |icon_type|.
32 ASH_EXPORT gfx::ImageSkia GetImageForNetwork( 32 ASH_EXPORT gfx::ImageSkia GetImageForNetwork(
33 const chromeos::NetworkState* network, 33 const chromeos::NetworkState* network,
34 IconType icon_type); 34 IconType icon_type);
35 35
36 // Gets the full strength image for a Wi-Fi network. 36 // Gets an image for a Wi-Fi network, either full strength or strike-through
37 // based on |connected|.
37 // TODO(estade): Expose SignalStrengthImageSource and use that instead. 38 // TODO(estade): Expose SignalStrengthImageSource and use that instead.
38 ASH_EXPORT gfx::ImageSkia GetImageForConnectedMobileNetwork(); 39 ASH_EXPORT gfx::ImageSkia GetBasicImageForWiFiNetwork(bool connected);
39 40
40 // Gets the disconnected image for a cell network. 41 // Gets the disconnected image for a cell network.
41 // TODO(estade): Expose SignalStrengthImageSource and use that instead. 42 // TODO(estade): Expose SignalStrengthImageSource and use that instead.
42 ASH_EXPORT gfx::ImageSkia GetImageForDisconnectedCellNetwork(); 43 ASH_EXPORT gfx::ImageSkia GetImageForDisconnectedCellNetwork();
43 44
44 // Gets the full strength image for a Wi-Fi network using |icon_color| for the 45 // Gets the full strength image for a Wi-Fi network using |icon_color| for the
45 // main icon and |badge_color| for the badge. 46 // main icon and |badge_color| for the badge.
46 ASH_EXPORT gfx::ImageSkia GetImageForNewWifiNetwork(SkColor icon_color, 47 ASH_EXPORT gfx::ImageSkia GetImageForNewWifiNetwork(SkColor icon_color,
47 SkColor badge_color); 48 SkColor badge_color);
48 49
49 // Gets the icon used to indicate whether system Wi-Fi is enabled or disabled.
50 ASH_EXPORT gfx::ImageSkia GetImageForWifiChipState(bool enabled);
51
52 // Returns the label for |network| based on |icon_type|. |network| cannot be 50 // Returns the label for |network| based on |icon_type|. |network| cannot be
53 // nullptr. 51 // nullptr.
54 ASH_EXPORT base::string16 GetLabelForNetwork( 52 ASH_EXPORT base::string16 GetLabelForNetwork(
55 const chromeos::NetworkState* network, 53 const chromeos::NetworkState* network,
56 IconType icon_type); 54 IconType icon_type);
57 55
58 // Updates and returns the appropriate message id if the cellular network 56 // Updates and returns the appropriate message id if the cellular network
59 // is uninitialized. 57 // is uninitialized.
60 ASH_EXPORT int GetCellularUninitializedMsg(); 58 ASH_EXPORT int GetCellularUninitializedMsg();
61 59
62 // 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|
63 // 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).
64 ASH_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type, 62 ASH_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type,
65 gfx::ImageSkia* image, 63 gfx::ImageSkia* image,
66 base::string16* label, 64 base::string16* label,
67 bool* animating); 65 bool* animating);
68 66
69 // 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
70 // from the global NetworkStateHandler instance and removes cached entries 68 // from the global NetworkStateHandler instance and removes cached entries
71 // that are no longer in the list. 69 // that are no longer in the list.
72 ASH_EXPORT void PurgeNetworkIconCache(); 70 ASH_EXPORT void PurgeNetworkIconCache();
73 71
74 } // namespace network_icon 72 } // namespace network_icon
75 } // namespace ash 73 } // namespace ash
76 74
77 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_ 75 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/network/network_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698