| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Gets the disconnected image for a cell network. | 40 // Gets the disconnected image for a cell network. |
| 41 // TODO(estade): Expose SignalStrengthImageSource and use that instead. | 41 // TODO(estade): Expose SignalStrengthImageSource and use that instead. |
| 42 ASH_EXPORT gfx::ImageSkia GetImageForDisconnectedCellNetwork(); | 42 ASH_EXPORT gfx::ImageSkia GetImageForDisconnectedCellNetwork(); |
| 43 | 43 |
| 44 // Gets the full strength image for a Wi-Fi network using |icon_color| for the | 44 // Gets the full strength image for a Wi-Fi network using |icon_color| for the |
| 45 // main icon and |badge_color| for the badge. | 45 // main icon and |badge_color| for the badge. |
| 46 ASH_EXPORT gfx::ImageSkia GetImageForNewWifiNetwork(SkColor icon_color, | 46 ASH_EXPORT gfx::ImageSkia GetImageForNewWifiNetwork(SkColor icon_color, |
| 47 SkColor badge_color); | 47 SkColor badge_color); |
| 48 | 48 |
| 49 // Returns a vpn image suitable for use on a light background. | |
| 50 ASH_EXPORT gfx::ImageSkia GetVpnImage(); | |
| 51 | |
| 52 // Returns the label for |network| based on |icon_type|. |network| cannot be | 49 // Returns the label for |network| based on |icon_type|. |network| cannot be |
| 53 // nullptr. | 50 // nullptr. |
| 54 ASH_EXPORT base::string16 GetLabelForNetwork( | 51 ASH_EXPORT base::string16 GetLabelForNetwork( |
| 55 const chromeos::NetworkState* network, | 52 const chromeos::NetworkState* network, |
| 56 IconType icon_type); | 53 IconType icon_type); |
| 57 | 54 |
| 58 // Updates and returns the appropriate message id if the cellular network | 55 // Updates and returns the appropriate message id if the cellular network |
| 59 // is uninitialized. | 56 // is uninitialized. |
| 60 ASH_EXPORT int GetCellularUninitializedMsg(); | 57 ASH_EXPORT int GetCellularUninitializedMsg(); |
| 61 | 58 |
| 62 // Gets the correct icon and label for |icon_type|. Also sets |animating| | 59 // 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). | 60 // based on whether or not the icon is animating (i.e. connecting). |
| 64 ASH_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type, | 61 ASH_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type, |
| 65 gfx::ImageSkia* image, | 62 gfx::ImageSkia* image, |
| 66 base::string16* label, | 63 base::string16* label, |
| 67 bool* animating); | 64 bool* animating); |
| 68 | 65 |
| 69 // Called when the list of networks changes. Retreives the list of networks | 66 // Called when the list of networks changes. Retreives the list of networks |
| 70 // from the global NetworkStateHandler instance and removes cached entries | 67 // from the global NetworkStateHandler instance and removes cached entries |
| 71 // that are no longer in the list. | 68 // that are no longer in the list. |
| 72 ASH_EXPORT void PurgeNetworkIconCache(); | 69 ASH_EXPORT void PurgeNetworkIconCache(); |
| 73 | 70 |
| 74 } // namespace network_icon | 71 } // namespace network_icon |
| 75 } // namespace ash | 72 } // namespace ash |
| 76 | 73 |
| 77 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_ | 74 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_ |
| OLD | NEW |