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

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

Issue 351353004: chromeos: Move some network related UI in ui/chromeos/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-build Created 6 years, 5 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
« no previous file with comments | « ui/chromeos/DEPS ('k') | ui/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_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_ 5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_ICON_H_
6 #define ASH_SYSTEM_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 "ash/ash_export.h"
11 #include "base/strings/string16.h" 10 #include "base/strings/string16.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 ash { 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 ASH_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 // Similar to GetImageForNetwork but returns the cached image url based on 37 // Similar to GetImageForNetwork but returns the cached image url based on
38 // |scale_factor| instead. 38 // |scale_factor| instead.
39 ASH_EXPORT std::string GetImageUrlForNetwork( 39 UI_CHROMEOS_EXPORT std::string GetImageUrlForNetwork(
40 const chromeos::NetworkState* network, 40 const chromeos::NetworkState* network,
41 IconType icon_type, 41 IconType icon_type,
42 float scale_factor); 42 float scale_factor);
43 43
44 // Gets the fulls strength image for a connected network type. 44 // Gets the fulls strength image for a connected network type.
45 ASH_EXPORT gfx::ImageSkia GetImageForConnectedNetwork( 45 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForConnectedNetwork(
46 IconType icon_type, 46 IconType icon_type,
47 const std::string& network_type); 47 const std::string& network_type);
48 48
49 // Gets the image for a connecting network type. 49 // Gets the image for a connecting network type.
50 ASH_EXPORT gfx::ImageSkia GetImageForConnectingNetwork( 50 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForConnectingNetwork(
51 IconType icon_type, 51 IconType icon_type,
52 const std::string& network_type); 52 const std::string& network_type);
53 53
54 // Gets the image for a disconnected network type. 54 // Gets the image for a disconnected network type.
55 ASH_EXPORT gfx::ImageSkia GetImageForDisconnectedNetwork( 55 UI_CHROMEOS_EXPORT gfx::ImageSkia GetImageForDisconnectedNetwork(
56 IconType icon_type, 56 IconType icon_type,
57 const std::string& network_type); 57 const std::string& network_type);
58 58
59 // Returns the label for |network| based on |icon_type|. |network| can be NULL. 59 // Returns the label for |network| based on |icon_type|. |network| can be NULL.
60 ASH_EXPORT base::string16 GetLabelForNetwork( 60 UI_CHROMEOS_EXPORT base::string16 GetLabelForNetwork(
61 const chromeos::NetworkState* network, 61 const chromeos::NetworkState* network,
62 IconType icon_type); 62 IconType icon_type);
63 63
64 // Updates and returns the appropriate message id if the cellular network 64 // Updates and returns the appropriate message id if the cellular network
65 // is uninitialized. 65 // is uninitialized.
66 ASH_EXPORT int GetCellularUninitializedMsg(); 66 UI_CHROMEOS_EXPORT int GetCellularUninitializedMsg();
67 67
68 // Gets the correct icon and label for |icon_type|. Also sets |animating| 68 // Gets the correct icon and label for |icon_type|. Also sets |animating|
69 // based on whether or not the icon is animating (i.e. connecting). 69 // based on whether or not the icon is animating (i.e. connecting).
70 ASH_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type, 70 UI_CHROMEOS_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type,
71 gfx::ImageSkia* image, 71 gfx::ImageSkia* image,
72 base::string16* label, 72 base::string16* label,
73 bool* animating); 73 bool* animating);
74 74
75 // Called when the list of networks changes. Retreives the list of networks 75 // Called when the list of networks changes. Retreives the list of networks
76 // from the global NetworkStateHandler instance and removes cached entries 76 // from the global NetworkStateHandler instance and removes cached entries
77 // that are no longer in the list. 77 // that are no longer in the list.
78 ASH_EXPORT void PurgeNetworkIconCache(); 78 UI_CHROMEOS_EXPORT void PurgeNetworkIconCache();
79 79
80 } // namespace network_icon 80 } // namespace network_icon
81 } // namespace ash 81 } // namespace ui
82 82
83 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_ 83 #endif // UI_CHROMEOS_NETWORK_NETWORK_ICON_H_
OLDNEW
« no previous file with comments | « ui/chromeos/DEPS ('k') | ui/chromeos/network/network_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698