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

Unified Diff: ash/system/chromeos/network/network_state_list_detailed_view.h

Issue 12221112: Update Ash network icon code and integrate with tray (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/chromeos/network/network_state_list_detailed_view.h
diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.h b/ash/system/chromeos/network/network_state_list_detailed_view.h
index 1ffb5090479efb380ff9bfa286f250123b2130ff..787e47cafe6b5837655fae4c5d111dfb74233251 100644
--- a/ash/system/chromeos/network/network_state_list_detailed_view.h
+++ b/ash/system/chromeos/network/network_state_list_detailed_view.h
@@ -27,6 +27,9 @@ class BubbleDelegateView;
namespace ash {
namespace internal {
+
+class TrayNetwork;
+
namespace tray {
struct NetworkInfo;
@@ -36,7 +39,8 @@ class NetworkStateListDetailedView : public NetworkDetailedView,
public ViewClickListener,
public network_icon::AnimationObserver {
public:
- NetworkStateListDetailedView(SystemTrayItem* owner, user::LoginStatus login);
+ NetworkStateListDetailedView(TrayNetwork* tray_network,
+ user::LoginStatus login);
virtual ~NetworkStateListDetailedView();
// Overridden from NetworkDetailedView:
@@ -59,6 +63,9 @@ class NetworkStateListDetailedView : public NetworkDetailedView,
virtual void ClickedOn(views::View* sender) OVERRIDE;
private:
+ typedef std::map<views::View*, std::string> NetworkMap;
+ typedef std::map<std::string, HoverHighlightView*> ServicePathMap;
+
// Create UI components.
void CreateHeaderEntry();
void CreateHeaderButtons();
@@ -67,11 +74,16 @@ class NetworkStateListDetailedView : public NetworkDetailedView,
// Update UI components.
void UpdateHeaderButtons();
- void RefreshNetworkList();
void UpdateNetworks(const NetworkStateList& networks);
+ void UpdateNetworkState();
+ void RefreshNetworkList();
+ bool CreateOrUpdateInfoLabel(
+ int index, const string16& text, views::Label** label);
+ bool UpdateNetworkChild(int index, const NetworkInfo* info);
+ bool OrderChild(views::View* view, int index);
+ bool UpdateNetworkListEntries(std::set<std::string>* new_service_paths);
void UpdateNetworkEntries();
void UpdateNetworkExtra();
- void UpdateNetworkIcons();
// Adds a settings entry when logged in, and an entry for changing proxy
// settings otherwise.
@@ -82,14 +94,17 @@ class NetworkStateListDetailedView : public NetworkDetailedView,
bool ResetInfoBubble();
views::View* CreateNetworkInfoView();
+ // Typed pointer to the owning tray item.
+ TrayNetwork* tray_network_;
+
// Track login state.
user::LoginStatus login_;
// A map of child views to their network service path.
- std::map<views::View*, std::string> network_map_;
+ NetworkMap network_map_;
// A map of network service paths to their view.
- std::map<std::string, HoverHighlightView*> service_path_map_;
+ ServicePathMap service_path_map_;
// An owned list of network info.
ScopedVector<NetworkInfo> network_list_;
@@ -111,6 +126,8 @@ class NetworkStateListDetailedView : public NetworkDetailedView,
TrayPopupLabelButton* settings_;
TrayPopupLabelButton* proxy_settings_;
views::Label* scanning_view_;
+ views::Label* no_wifi_networks_view_;
+ views::Label* no_cellular_networks_view_;
// A small bubble for displaying network info.
views::BubbleDelegateView* info_bubble_;
« no previous file with comments | « ash/system/chromeos/network/network_icon_animation.cc ('k') | ash/system/chromeos/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698