| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H | 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H |
| 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H | 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 | 11 |
| 12 namespace ash { | 12 namespace ash { |
| 13 | 13 |
| 14 struct NetworkIconInfo; | 14 struct NetworkIconInfo; |
| 15 | 15 class NetworkTrayDelegate; |
| 16 class NetworkTrayDelegate { | |
| 17 public: | |
| 18 virtual ~NetworkTrayDelegate() {} | |
| 19 | |
| 20 // Notifies that the |index|-th link on the notification is clicked. | |
| 21 virtual void NotificationLinkClicked(size_t index) = 0; | |
| 22 }; | |
| 23 | 16 |
| 24 class NetworkObserver { | 17 class NetworkObserver { |
| 25 public: | 18 public: |
| 26 enum MessageType { | 19 enum MessageType { |
| 27 // Priority order, highest to lowest. | 20 // Priority order, highest to lowest. |
| 28 ERROR_CONNECT_FAILED, | 21 ERROR_CONNECT_FAILED, |
| 22 ERROR_OUT_OF_CREDITS, |
| 29 MESSAGE_DATA_PROMO, | 23 MESSAGE_DATA_PROMO, |
| 30 }; | 24 }; |
| 31 | 25 |
| 32 enum NetworkType { | 26 enum NetworkType { |
| 33 // ash relevant subset of network_constants.h connection type. | 27 // ash relevant subset of network_constants.h connection type. |
| 34 NETWORK_ETHERNET, | 28 NETWORK_ETHERNET, |
| 35 NETWORK_CELLULAR, | 29 NETWORK_CELLULAR, |
| 36 NETWORK_CELLULAR_LTE, | 30 NETWORK_CELLULAR_LTE, |
| 37 NETWORK_WIFI, | 31 NETWORK_WIFI, |
| 38 NETWORK_BLUETOOTH, | 32 NETWORK_BLUETOOTH, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 59 | 53 |
| 60 // Called when the user attempted to toggle Wi-Fi enable/disable. | 54 // Called when the user attempted to toggle Wi-Fi enable/disable. |
| 61 // NOTE: Toggling is asynchronous and subsequent calls to query the current | 55 // NOTE: Toggling is asynchronous and subsequent calls to query the current |
| 62 // state may return the old value. | 56 // state may return the old value. |
| 63 virtual void OnWillToggleWifi() = 0; | 57 virtual void OnWillToggleWifi() = 0; |
| 64 }; | 58 }; |
| 65 | 59 |
| 66 } // namespace ash | 60 } // namespace ash |
| 67 | 61 |
| 68 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H | 62 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H |
| OLD | NEW |