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.
5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
8 #include "ash/system/chromeos/network/tray_network_state_observer.h"
9 #include "ash/system/tray/system_tray_item.h"
10 #include "base/memory/scoped_ptr.h"
13 class TrayNetworkStateObserver
;
16 class NetworkDetailedView
;
18 class VpnDetailedView
;
21 class TrayVPN
: public SystemTrayItem
,
22 public TrayNetworkStateObserver::Delegate
{
24 explicit TrayVPN(SystemTray
* system_tray
);
28 virtual views::View
* CreateTrayView(user::LoginStatus status
) OVERRIDE
;
29 virtual views::View
* CreateDefaultView(user::LoginStatus status
) OVERRIDE
;
30 virtual views::View
* CreateDetailedView(user::LoginStatus status
) OVERRIDE
;
31 virtual void DestroyTrayView() OVERRIDE
;
32 virtual void DestroyDefaultView() OVERRIDE
;
33 virtual void DestroyDetailedView() OVERRIDE
;
34 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status
) OVERRIDE
;
35 virtual void UpdateAfterShelfAlignmentChange(
36 ShelfAlignment alignment
) OVERRIDE
;
38 // TrayNetworkStateObserver::Delegate
39 virtual void NetworkStateChanged(bool list_changed
) OVERRIDE
;
40 virtual void NetworkServiceChanged(
41 const chromeos::NetworkState
* network
) OVERRIDE
;
44 tray::VpnDefaultView
* default_
;
45 tray::NetworkDetailedView
* detailed_
;
46 scoped_ptr
<TrayNetworkStateObserver
> network_state_observer_
;
48 DISALLOW_COPY_AND_ASSIGN(TrayVPN
);
53 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H