replace OVERRIDE and FINAL with override and final in ash/
[chromium-blink-merge.git] / ash / system / chromeos / network / tray_network.h
blob407b64e52714307c90352be24c2f0e1da9e17794
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_H
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_H
8 #include <set>
10 #include "ash/system/chromeos/network/network_observer.h"
11 #include "ash/system/chromeos/network/network_portal_detector_observer.h"
12 #include "ash/system/chromeos/network/tray_network_state_observer.h"
13 #include "ash/system/tray/system_tray_item.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/time/time.h"
17 namespace chromeos {
18 class NetworkState;
21 namespace ash {
22 namespace tray {
23 class NetworkDefaultView;
24 class NetworkDetailedView;
25 class NetworkTrayView;
28 class TrayNetwork : public SystemTrayItem,
29 public NetworkObserver,
30 public NetworkPortalDetectorObserver,
31 public TrayNetworkStateObserver::Delegate {
32 public:
33 explicit TrayNetwork(SystemTray* system_tray);
34 virtual ~TrayNetwork();
36 tray::NetworkDetailedView* detailed() { return detailed_; }
38 // SystemTrayItem
39 virtual views::View* CreateTrayView(user::LoginStatus status) override;
40 virtual views::View* CreateDefaultView(user::LoginStatus status) override;
41 virtual views::View* CreateDetailedView(user::LoginStatus status) override;
42 virtual void DestroyTrayView() override;
43 virtual void DestroyDefaultView() override;
44 virtual void DestroyDetailedView() override;
45 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) override;
46 virtual void UpdateAfterShelfAlignmentChange(
47 ShelfAlignment alignment) override;
49 // NetworkObserver
50 virtual void RequestToggleWifi() override;
52 // NetworkPortalDetectorObserver
53 virtual void OnCaptivePortalDetected(
54 const std::string& service_path) override;
56 // TrayNetworkStateObserver::Delegate
57 virtual void NetworkStateChanged(bool list_changed) override;
58 virtual void NetworkServiceChanged(
59 const chromeos::NetworkState* network) override;
61 private:
62 tray::NetworkTrayView* tray_;
63 tray::NetworkDefaultView* default_;
64 tray::NetworkDetailedView* detailed_;
65 bool request_wifi_view_;
66 scoped_ptr<TrayNetworkStateObserver> network_state_observer_;
68 DISALLOW_COPY_AND_ASSIGN(TrayNetwork);
71 } // namespace ash
73 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_H