| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 protected: | 68 protected: |
| 69 // NetworkMenu implementation: | 69 // NetworkMenu implementation: |
| 70 virtual bool IsBrowserMode() const; | 70 virtual bool IsBrowserMode() const; |
| 71 virtual gfx::NativeWindow GetNativeWindow() const; | 71 virtual gfx::NativeWindow GetNativeWindow() const; |
| 72 virtual void OpenButtonOptions(); | 72 virtual void OpenButtonOptions(); |
| 73 virtual bool ShouldOpenButtonOptions() const; | 73 virtual bool ShouldOpenButtonOptions() const; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 // Sets the icon and the badge. | 76 // Sets the icon and the badge. |
| 77 void SetIconAndBadge(const SkBitmap& icon, const SkBitmap& badge); | 77 void SetIconAndBadge(const SkBitmap* icon, const SkBitmap* badge); |
| 78 // Sets the icon only. Keep the previous badge. | 78 // Sets the icon only. Keep the previous badge. |
| 79 void SetIconOnly(const SkBitmap& icon); | 79 void SetIconOnly(const SkBitmap* icon); |
| 80 // Sets the badge only. Keep the previous icon. | 80 // Sets the badge only. Keep the previous icon. |
| 81 void SetBadgeOnly(const SkBitmap& badge); | 81 void SetBadgeOnly(const SkBitmap* badge); |
| 82 // Set the network icon based on the status of the |network| | 82 // Set the network icon based on the status of the |network| |
| 83 void SetNetworkIcon(NetworkLibrary* cros, const Network* network); | 83 void SetNetworkIcon(NetworkLibrary* cros, const Network* network); |
| 84 | 84 |
| 85 // Called when the active network has possibly changed. This will remove | 85 // Called when the active network has possibly changed. This will remove |
| 86 // old network observer and add a network observer for the active network. | 86 // old network observer and add a network observer for the active network. |
| 87 void RefreshNetworkObserver(NetworkLibrary* cros); | 87 void RefreshNetworkObserver(NetworkLibrary* cros); |
| 88 | 88 |
| 89 // The status area host, | 89 // The status area host, |
| 90 StatusAreaHost* host_; | 90 StatusAreaHost* host_; |
| 91 | 91 |
| 92 // The icon showing the network strength. | 92 // The icon showing the network strength. |
| 93 SkBitmap icon_; | 93 const SkBitmap* icon_; |
| 94 // A badge icon displayed on top of the icon. | 94 // A badge icon displayed on top of the icon. |
| 95 SkBitmap badge_; | 95 const SkBitmap* badge_; |
| 96 | 96 |
| 97 // The throb animation that does the wifi connecting animation. | 97 // The throb animation that does the wifi connecting animation. |
| 98 ui::ThrobAnimation animation_connecting_; | 98 ui::ThrobAnimation animation_connecting_; |
| 99 | 99 |
| 100 // The duration of the icon throbbing in milliseconds. | 100 // The duration of the icon throbbing in milliseconds. |
| 101 static const int kThrobDuration; | 101 static const int kThrobDuration; |
| 102 | 102 |
| 103 // If any network is currently active, this is the service path of the one | 103 // If any network is currently active, this is the service path of the one |
| 104 // whose status is displayed in the network menu button. | 104 // whose status is displayed in the network menu button. |
| 105 std::string active_network_; | 105 std::string active_network_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); | 107 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace chromeos | 110 } // namespace chromeos |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 112 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
| OLD | NEW |