Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ash / system / chromeos / network / network_detailed_view.h
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 tray {
13
14 // Abstract base class for all NetworkDetailedView derived subclasses,
15 // which includes NetworkWifiDetailedView and NetworkStateListDetailedView.
16 class NetworkDetailedView : public TrayDetailsView {
17  public:
18   enum DetailedViewType {
19     LIST_VIEW,
20     STATE_LIST_VIEW,
21     WIFI_VIEW,
22   };
23
24   explicit NetworkDetailedView(SystemTrayItem* owner)
25       : TrayDetailsView(owner) {
26   }
27
28   virtual void Init() = 0;
29
30   virtual DetailedViewType GetViewType() const = 0;
31
32   // Called when network manager state has changed.
33   // (Generic update for NetworkTray <> AshSystemTrayDelegate interface).
34   virtual void ManagerChanged() = 0;
35
36   // Called when the contents of the network list have changed.
37   // (Called only from TrayNetworkStateObserver).
38   virtual void NetworkListChanged() = 0;
39
40   // Called when a network service property has changed.
41   // (Called only from TrayNetworkStateObserver).
42   virtual void NetworkServiceChanged(const chromeos::NetworkState* network) = 0;
43
44  protected:
45   virtual ~NetworkDetailedView() {}
46 };
47
48 }  // namespace tray
49 }  // namespace ash
50
51 #endif  // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H