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 3 // found in the LICENSE file. 4 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H 7 8 #include "ash/system/tray/tray_details_view.h" 9 #include "chromeos/network/network_state_handler.h" 10 11 namespace ash { 12 namespace internal { 13 14 namespace tray { 15 16 // Abstract base class for all NetworkDetailedView derived subclasses, 17 // which includes NetworkWifiDetailedView and NetworkStateListDetailedView. 18 class NetworkDetailedView : public TrayDetailsView { 19 public: 20 enum DetailedViewType { 21 LIST_VIEW, 22 STATE_LIST_VIEW, 23 WIFI_VIEW, 24 }; 25 26 explicit NetworkDetailedView(SystemTrayItem* owner) 27 : TrayDetailsView(owner) { 28 } 29 30 virtual void Init() = 0; 31 32 virtual DetailedViewType GetViewType() const = 0; 33 34 // Called when network manager state has changed. 35 // (Generic update for NetworkTray <> AshSystemTrayDelegate interface). 36 virtual void ManagerChanged() = 0; 37 38 // Called when the contents of the network list have changed. 39 // (Called only from TrayNetworkStateObserver). 40 virtual void NetworkListChanged() = 0; 41 42 // Called when a network service property has changed. 43 // (Called only from TrayNetworkStateObserver). 44 virtual void NetworkServiceChanged(const chromeos::NetworkState* network) = 0; 45 46 protected: 47 virtual ~NetworkDetailedView() {} 48 }; 49 50 } // namespace tray 51 52 } // namespace internal 53 } // namespace ash 54 55 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H 56