Skip to content

Commit

Permalink
Add NetworkStateListDetailedView
Browse files Browse the repository at this point in the history
Implemented behind --ash-network-state-handler
Copies the bulk of the NetworkMenuIcon logic to ash; NetworkMenuIcon will eventually be deprecated.

BUG=161869
For .grd changes:
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/11361274

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170748 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
stevenjb@chromium.org committed Dec 3, 2012
1 parent 35dabb1 commit 8e610e7
Show file tree
Hide file tree
Showing 16 changed files with 1,570 additions and 30 deletions.
9 changes: 8 additions & 1 deletion ash/ash.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,18 @@
'system/chromeos/keyboard_brightness_controller.cc',
'system/chromeos/keyboard_brightness_controller.h',
'system/chromeos/network/network_detailed_view.h',
'system/chromeos/network/network_list_detailed_view_base.h',
'system/chromeos/network/network_icon.cc',
'system/chromeos/network/network_icon.h',
'system/chromeos/network/network_icon_animation_observer.h',
'system/chromeos/network/network_list_detailed_view_base.cc',
'system/chromeos/network/network_list_detailed_view_base.h',
'system/chromeos/network/network_observer.h',
'system/chromeos/network/network_state_list_detailed_view.cc',
'system/chromeos/network/network_state_list_detailed_view.h',
'system/chromeos/network/tray_network.cc',
'system/chromeos/network/tray_network.h',
'system/chromeos/network/tray_network_state_observer.cc',
'system/chromeos/network/tray_network_state_observer.h',
'system/chromeos/network/tray_sms.cc',
'system/chromeos/network/tray_sms.h',
'system/chromeos/network/tray_vpn.cc',
Expand Down
4 changes: 4 additions & 0 deletions ash/ash_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ Press Shift + Alt to switch.
<message name="IDS_ASH_STATUS_TRAY_NO_NETWORKS" desc="The message to display in the network info bubble when it is otherwise empty.">
No network information available
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING" desc="Shows a connecting network in the network list.">
<ph name="NETWORK">$1<ex>GoogleGuest</ex></ph>: Connecting...
</message>

<message name="IDS_ASH_STATUS_TRAY_PREVIOUS_MENU" desc="The accessible text for header entries for detailed versions of status tray items.">
Previous menu
</message>
Expand Down
25 changes: 20 additions & 5 deletions ash/system/chromeos/network/network_detailed_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H

#include "ash/system/tray/tray_details_view.h"
#include "chromeos/network/network_state_handler.h"

namespace ash {
namespace internal {
Expand All @@ -16,19 +17,33 @@ namespace tray {
// which includes NetworkWifiDetailedView and NetworkListDetailedViewBase.
class NetworkDetailedView : public TrayDetailsView {
public:
explicit NetworkDetailedView(SystemTrayItem* owner)
: TrayDetailsView(owner) {
}
typedef chromeos::NetworkStateHandler::NetworkStateList NetworkStateList;

enum DetailedViewType {
LIST_VIEW,
STATE_LIST_VIEW,
WIFI_VIEW,
};

explicit NetworkDetailedView(SystemTrayItem* owner)
: TrayDetailsView(owner) {
}

virtual void Init() = 0;

virtual DetailedViewType GetViewType() const = 0;
// Updates network data and UI of the detailed view.
virtual void Update() = 0;

// Called when network manager state has changed.
// (Generic update for NetworkTray <> AshSystemTrayDelegate interface).
virtual void ManagerChanged() = 0;

// Called when the contents of the network list have changed.
// (Called only from TrayNetworkStateObserver).
virtual void NetworkListChanged(const NetworkStateList& networks) = 0;

// Called when a network service property has changed.
// (Called only from TrayNetworkStateObserver).
virtual void NetworkServiceChanged(const chromeos::NetworkState* network) = 0;

protected:
virtual ~NetworkDetailedView() {}
Expand Down
Loading

0 comments on commit 8e610e7

Please sign in to comment.