Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7bb6872e7900a4902f9f329c5f90413319a513de |
| --- /dev/null |
| +++ b/ash/system/chromeos/network/network_state_list_detailed_view.h |
| @@ -0,0 +1,111 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H |
| +#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H |
| + |
| +#include "ash/system/chromeos/network/network_detailed_view.h" |
| +#include "ash/system/chromeos/network/network_icon.h" |
| +#include "ash/system/tray/tray_views.h" |
| +#include "ash/system/user/login_status.h" |
| +#include "base/memory/scoped_vector.h" |
| +#include "ui/views/controls/button/button.h" |
| + |
| +#include <map> |
| +#include <string> |
| +#include <vector> |
| + |
| +namespace chromeos { |
| +class NetworkStateList; |
| +} |
| + |
| +namespace views { |
| +class BubbleDelegateView; |
| +} |
| + |
| +namespace ash { |
| +namespace internal { |
| +namespace tray { |
| + |
| +struct NetworkInfo; |
| + |
| +class NetworkStateListDetailedView : public NetworkDetailedView, |
| + public views::ButtonListener, |
| + public ViewClickListener, |
| + public NetworkIcon::AnimationObserver { |
| + public: |
| + NetworkStateListDetailedView(user::LoginStatus login); |
| + virtual ~NetworkStateListDetailedView(); |
| + |
| + // Overridden from NetworkDetailedView: |
|
jennyz
2012/11/27 01:43:52
nit: ":" -> "." for consistency.
|
| + virtual void Init() OVERRIDE; |
| + virtual DetailedViewType GetViewType() const OVERRIDE; |
| + virtual void ManagerChanged() OVERRIDE; |
| + virtual void NetworkListChanged(const NetworkStateList& networks) OVERRIDE; |
| + virtual void NetworkServiceChanged(const std::string& service_path) OVERRIDE; |
| + |
| + // NetworkIcon::AnimationObserver overrides |
| + virtual void NetworkIconChanged() OVERRIDE; |
| + |
| + protected: |
| + // Overridden from ButtonListener. |
| + virtual void ButtonPressed(views::Button* sender, |
| + const ui::Event& event) OVERRIDE; |
| + |
| + // Overridden from ViewClickListener. |
| + virtual void ClickedOn(views::View* sender) OVERRIDE; |
| + |
| + private: |
| + // Create UI components. |
| + void CreateHeaderEntry(); |
| + void CreateHeaderButtons(); |
| + void CreateNetworkEntries(); |
| + void CreateNetworkExtra(); |
| + |
| + // Update UI components. |
| + void UpdateHeaderButtons(); |
| + void RefreshNetworkList(); |
| + void UpdateNetworks(const NetworkStateList& networks); |
| + void UpdateNetworkEntries(); |
| + void UpdateNetworkExtra(); |
| + void UpdateNetworkIcons(); |
| + |
| + // Adds a settings entry when logged in, and an entry for changing proxy |
| + // settings otherwise. |
| + void CreateSettingsEntry(); |
| + |
| + // Create and manage the network info bubble. |
| + void ToggleInfoBubble(); |
| + bool ResetInfoBubble(); |
| + views::View* CreateNetworkInfoView(); |
| + |
| + std::string carrier_id_; |
| + std::string topup_url_; |
| + std::string setup_url_; |
| + |
| + user::LoginStatus login_; |
| + std::map<views::View*, std::string> network_map_; |
| + std::map<std::string, HoverHighlightView*> service_path_map_; |
| + ScopedVector<NetworkInfo> network_list_; |
| + TrayPopupHeaderButton* info_icon_; |
| + TrayPopupHeaderButton* button_wifi_; |
| + TrayPopupHeaderButton* button_mobile_; |
| + views::View* view_mobile_account_; |
| + views::View* setup_mobile_account_; |
| + TrayPopupTextButton* other_wifi_; |
| + TrayPopupTextButton* turn_on_wifi_; |
| + TrayPopupTextButton* other_mobile_; |
| + TrayPopupTextButton* settings_; |
| + TrayPopupTextButton* proxy_settings_; |
| + |
| + views::BubbleDelegateView* info_bubble_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(NetworkStateListDetailedView); |
| +}; |
| + |
| +} // namespace tray |
| +} // namespace internal |
| +} // namespace ash |
| + |
| +#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW |