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 #include <vector> | 10 #include <vector> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual menus::MenuModel* GetSubmenuModelAt(int index) const { return NULL; } | 79 virtual menus::MenuModel* GetSubmenuModelAt(int index) const { return NULL; } |
80 virtual void HighlightChangedTo(int index) {} | 80 virtual void HighlightChangedTo(int index) {} |
81 virtual void ActivatedAt(int index); | 81 virtual void ActivatedAt(int index); |
82 virtual void MenuWillShow() {} | 82 virtual void MenuWillShow() {} |
83 | 83 |
84 // AnimationDelegate implementation. | 84 // AnimationDelegate implementation. |
85 virtual void AnimationProgressed(const Animation* animation); | 85 virtual void AnimationProgressed(const Animation* animation); |
86 | 86 |
87 // NetworkLibrary::Observer implementation. | 87 // NetworkLibrary::Observer implementation. |
88 virtual void NetworkChanged(NetworkLibrary* obj); | 88 virtual void NetworkChanged(NetworkLibrary* obj); |
89 virtual void NetworkTraffic(NetworkLibrary* cros, int traffic_type); | |
90 | 89 |
91 // Returns the Icon for a network strength between 0 and 100. | 90 // Returns the Icon for a network strength between 0 and 100. |
92 // |black| is used to specify whether to return a black icon for display | 91 // |black| is used to specify whether to return a black icon for display |
93 // on a light background or a white icon for display on a dark background. | 92 // on a light background or a white icon for display on a dark background. |
94 static SkBitmap IconForNetworkStrength(int strength, bool black); | 93 static SkBitmap IconForNetworkStrength(int strength, bool black); |
95 | 94 |
96 // This method will convert the |icon| bitmap to the correct size for display. | 95 // This method will convert the |icon| bitmap to the correct size for display. |
97 // If the |badge| icon is not empty, it will draw that on top of the icon. | 96 // If the |badge| icon is not empty, it will draw that on top of the icon. |
98 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge); | 97 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge); |
99 | 98 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 169 |
171 // The duration of the icon throbbing in milliseconds. | 170 // The duration of the icon throbbing in milliseconds. |
172 static const int kThrobDuration; | 171 static const int kThrobDuration; |
173 | 172 |
174 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); | 173 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); |
175 }; | 174 }; |
176 | 175 |
177 } // namespace chromeos | 176 } // namespace chromeos |
178 | 177 |
179 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 178 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
OLD | NEW |