| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/task.h" | 11 #include "base/task.h" |
| 12 #include "base/timer.h" | 12 #include "base/timer.h" |
| 13 #include "chrome/browser/chromeos/cros/network_library.h" | 13 #include "chrome/browser/chromeos/cros/network_library.h" |
| 14 #include "chrome/browser/chromeos/customization_document.h" | 14 #include "chrome/browser/chromeos/customization_document.h" |
| 15 #include "chrome/browser/chromeos/login/message_bubble.h" | 15 #include "chrome/browser/chromeos/login/message_bubble.h" |
| 16 #include "chrome/browser/chromeos/status/network_menu.h" | 16 #include "chrome/browser/chromeos/status/network_menu.h" |
| 17 #include "chrome/browser/chromeos/status/status_area_button.h" | 17 #include "chrome/browser/chromeos/status/status_area_button.h" |
| 18 #include "ui/base/animation/throb_animation.h" | 18 #include "ui/base/animation/throb_animation.h" |
| 19 | 19 |
| 20 class PrefService; |
| 21 |
| 20 namespace gfx { | 22 namespace gfx { |
| 21 class Canvas; | 23 class Canvas; |
| 22 } | 24 } |
| 23 | 25 |
| 24 namespace chromeos { | 26 namespace chromeos { |
| 25 | 27 |
| 26 class StatusAreaHost; | 28 class StatusAreaHost; |
| 27 | 29 |
| 28 // The network menu button in the status area. | 30 // The network menu button in the status area. |
| 29 // This class will handle getting the wifi networks and populating the menu. | 31 // This class will handle getting the wifi networks and populating the menu. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 53 public NetworkMenu, | 55 public NetworkMenu, |
| 54 public NetworkLibrary::NetworkDeviceObserver, | 56 public NetworkLibrary::NetworkDeviceObserver, |
| 55 public NetworkLibrary::NetworkManagerObserver, | 57 public NetworkLibrary::NetworkManagerObserver, |
| 56 public NetworkLibrary::NetworkObserver, | 58 public NetworkLibrary::NetworkObserver, |
| 57 public NetworkLibrary::CellularDataPlanObserver, | 59 public NetworkLibrary::CellularDataPlanObserver, |
| 58 public MessageBubbleDelegate { | 60 public MessageBubbleDelegate { |
| 59 public: | 61 public: |
| 60 explicit NetworkMenuButton(StatusAreaHost* host); | 62 explicit NetworkMenuButton(StatusAreaHost* host); |
| 61 virtual ~NetworkMenuButton(); | 63 virtual ~NetworkMenuButton(); |
| 62 | 64 |
| 65 static void RegisterPrefs(PrefService* local_state); |
| 66 |
| 63 // ui::AnimationDelegate implementation. | 67 // ui::AnimationDelegate implementation. |
| 64 virtual void AnimationProgressed(const ui::Animation* animation); | 68 virtual void AnimationProgressed(const ui::Animation* animation); |
| 65 | 69 |
| 66 // NetworkLibrary::NetworkDeviceObserver implementation. | 70 // NetworkLibrary::NetworkDeviceObserver implementation. |
| 67 virtual void OnNetworkDeviceChanged(NetworkLibrary* cros, | 71 virtual void OnNetworkDeviceChanged(NetworkLibrary* cros, |
| 68 const NetworkDevice* device); | 72 const NetworkDevice* device); |
| 69 // NetworkLibrary::NetworkManagerObserver implementation. | 73 // NetworkLibrary::NetworkManagerObserver implementation. |
| 70 virtual void OnNetworkManagerChanged(NetworkLibrary* cros); | 74 virtual void OnNetworkManagerChanged(NetworkLibrary* cros); |
| 71 // NetworkLibrary::NetworkObserver implementation. | 75 // NetworkLibrary::NetworkObserver implementation. |
| 72 virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network); | 76 virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 156 |
| 153 // Factory for delaying showing promo notification. | 157 // Factory for delaying showing promo notification. |
| 154 ScopedRunnableMethodFactory<NetworkMenuButton> method_factory_; | 158 ScopedRunnableMethodFactory<NetworkMenuButton> method_factory_; |
| 155 | 159 |
| 156 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); | 160 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); |
| 157 }; | 161 }; |
| 158 | 162 |
| 159 } // namespace chromeos | 163 } // namespace chromeos |
| 160 | 164 |
| 161 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 165 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
| OLD | NEW |