| 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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 NETWORK_ETHERNET, | 28 NETWORK_ETHERNET, |
| 29 NETWORK_CELLULAR, | 29 NETWORK_CELLULAR, |
| 30 NETWORK_CELLULAR_LTE, | 30 NETWORK_CELLULAR_LTE, |
| 31 NETWORK_WIFI, | 31 NETWORK_WIFI, |
| 32 NETWORK_BLUETOOTH, | 32 NETWORK_BLUETOOTH, |
| 33 NETWORK_UNKNOWN, | 33 NETWORK_UNKNOWN, |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 virtual ~NetworkObserver() {} | 36 virtual ~NetworkObserver() {} |
| 37 | 37 |
| 38 virtual void OnNetworkRefresh(const NetworkIconInfo& info) = 0; | |
| 39 | |
| 40 // Sets a network message notification. | 38 // Sets a network message notification. |
| 41 // |message_type| identifies the type of message. | 39 // |message_type| identifies the type of message. |
| 42 // |network_type| identifies the type of network involved. | 40 // |network_type| identifies the type of network involved. |
| 43 // |delegate|->NotificationLinkClicked() will be called if any of the | 41 // |delegate|->NotificationLinkClicked() will be called if any of the |
| 44 // |links| are clicked (if supplied, |links| may be empty). | 42 // |links| are clicked (if supplied, |links| may be empty). |
| 45 virtual void SetNetworkMessage(NetworkTrayDelegate* delegate, | 43 virtual void SetNetworkMessage(NetworkTrayDelegate* delegate, |
| 46 MessageType message_type, | 44 MessageType message_type, |
| 47 NetworkType network_type, | 45 NetworkType network_type, |
| 48 const base::string16& title, | 46 const base::string16& title, |
| 49 const base::string16& message, | 47 const base::string16& message, |
| 50 const std::vector<base::string16>& links) = 0; | 48 const std::vector<base::string16>& links) = 0; |
| 49 |
| 51 // Clears the message notification for |message_type|. | 50 // Clears the message notification for |message_type|. |
| 52 virtual void ClearNetworkMessage(MessageType message_type) = 0; | 51 virtual void ClearNetworkMessage(MessageType message_type) = 0; |
| 53 | 52 |
| 54 // Called when the user attempted to toggle Wi-Fi enable/disable. | 53 // Called to request toggling Wi-Fi enable/disable, e.g. from an accelerator. |
| 55 // NOTE: Toggling is asynchronous and subsequent calls to query the current | 54 // NOTE: Toggling is asynchronous and subsequent calls to query the current |
| 56 // state may return the old value. | 55 // state may return the old value. |
| 57 virtual void OnWillToggleWifi() = 0; | 56 virtual void RequestToggleWifi() = 0; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace ash | 59 } // namespace ash |
| 61 | 60 |
| 62 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H | 61 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H |
| OLD | NEW |