Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: ash/common/system/chromeos/network/tray_network_state_observer.h

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/common/system/chromeos/network/tray_network_state_observer.h
diff --git a/ash/common/system/chromeos/network/tray_network_state_observer.h b/ash/common/system/chromeos/network/tray_network_state_observer.h
deleted file mode 100644
index 178a68095e4e02e2b176bb7521f0dbbba84062de..0000000000000000000000000000000000000000
--- a/ash/common/system/chromeos/network/tray_network_state_observer.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H_
-#define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H_
-
-#include "base/macros.h"
-#include "base/timer/timer.h"
-#include "chromeos/network/network_state_handler_observer.h"
-
-namespace ash {
-
-class TrayNetworkStateObserver : public chromeos::NetworkStateHandlerObserver {
- public:
- class Delegate {
- public:
- // Called when any interesting network changes occur. The frequency of this
- // event is limited to kUpdateFrequencyMs.
- virtual void NetworkStateChanged() = 0;
-
- protected:
- virtual ~Delegate() {}
- };
-
- explicit TrayNetworkStateObserver(Delegate* delegate);
-
- ~TrayNetworkStateObserver() override;
-
- // NetworkStateHandlerObserver overrides.
- void NetworkListChanged() override;
- void DeviceListChanged() override;
- void DefaultNetworkChanged(const chromeos::NetworkState* network) override;
- void NetworkConnectionStateChanged(
- const chromeos::NetworkState* network) override;
- void NetworkPropertiesUpdated(const chromeos::NetworkState* network) override;
-
- private:
- void SignalUpdate();
- void SendNetworkStateChanged();
-
- // Unowned Delegate pointer (must outlive this instance).
- Delegate* delegate_;
-
- // Set to true when we should purge stale icons in the cache.
- bool purge_icons_;
-
- // Frequency at which to push NetworkStateChanged updates. This avoids
- // unnecessarily frequent UI updates (which can be expensive). We set this
- // to 0 for tests to eliminate timing variance.
- int update_frequency_;
-
- // Timer used to limit the frequency of NetworkStateChanged updates.
- base::OneShotTimer timer_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayNetworkStateObserver);
-};
-
-} // namespace ash
-
-#endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H_
« no previous file with comments | « ash/common/system/chromeos/network/tray_network.cc ('k') | ash/common/system/chromeos/network/tray_network_state_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698