Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ash / system / chromeos / network / tray_network_state_observer.h
blob12a60e3175f92f44ccc305fb59afc1787d351aa5
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_NETWORK_STATE_OBSERVER_H
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "chromeos/network/network_state_handler_observer.h"
13 namespace ash {
15 class TrayNetworkStateObserver : public chromeos::NetworkStateHandlerObserver {
16 public:
17 class Delegate {
18 public:
19 // Called when the network state may have changed. If |list_changed| is
20 // true then the list of networks may have changed.
21 virtual void NetworkStateChanged(bool list_changed) = 0;
23 // Called when the properties for |network| may have been updated.
24 virtual void NetworkServiceChanged(
25 const chromeos::NetworkState* network) = 0;
27 protected:
28 virtual ~Delegate() {}
31 explicit TrayNetworkStateObserver(Delegate* delegate);
33 virtual ~TrayNetworkStateObserver();
35 // NetworkStateHandlerObserver overrides.
36 virtual void NetworkListChanged() OVERRIDE;
37 virtual void DeviceListChanged() OVERRIDE;
38 virtual void DefaultNetworkChanged(
39 const chromeos::NetworkState* network) OVERRIDE;
40 virtual void NetworkConnectionStateChanged(
41 const chromeos::NetworkState* network) OVERRIDE;
42 virtual void NetworkPropertiesUpdated(
43 const chromeos::NetworkState* network) OVERRIDE;
45 private:
46 Delegate* delegate_;
48 DISALLOW_COPY_AND_ASSIGN(TrayNetworkStateObserver);
51 } // namespace ash
53 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H