| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 void SetFirstLevelMenuWidth(int width); | 109 void SetFirstLevelMenuWidth(int width); |
| 110 | 110 |
| 111 // Cancels the active menu. | 111 // Cancels the active menu. |
| 112 void CancelMenu(); | 112 void CancelMenu(); |
| 113 | 113 |
| 114 // Returns the Icon for a network strength between 0 and 100. | 114 // Returns the Icon for a network strength between 0 and 100. |
| 115 // |black| is used to specify whether to return a black icon for display | 115 // |black| is used to specify whether to return a black icon for display |
| 116 // on a light background or a white icon for display on a dark background. | 116 // on a light background or a white icon for display on a dark background. |
| 117 static SkBitmap IconForNetworkStrength(int strength, bool black); | 117 static SkBitmap IconForNetworkStrength(int strength, bool black); |
| 118 |
| 118 // Returns the Icon for a network strength for CellularNetwork |cellular|. | 119 // Returns the Icon for a network strength for CellularNetwork |cellular|. |
| 119 // This returns different colored bars depending on cellular data left. | 120 // This returns different colored bars depending on cellular data left. |
| 120 static SkBitmap IconForNetworkStrength(const CellularNetwork* cellular); | 121 static SkBitmap IconForNetworkStrength(const CellularNetwork* cellular); |
| 121 // Returns the Badge for a given network technology. | 122 |
| 122 // This returns different colored symbols depending on cellular data left. | |
| 123 static SkBitmap BadgeForNetworkTechnology(const CellularNetwork* cellular); | |
| 124 // This method will convert the |icon| bitmap to the correct size for display. | 123 // This method will convert the |icon| bitmap to the correct size for display. |
| 125 // If the |badge| icon is not empty, it will draw that on top of the icon. | 124 // If the |badge| icon is not empty, it will draw that on top of the icon. |
| 126 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge); | 125 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge); |
| 127 | 126 |
| 128 protected: | 127 protected: |
| 129 virtual bool IsBrowserMode() const = 0; | 128 virtual bool IsBrowserMode() const = 0; |
| 130 virtual gfx::NativeWindow GetNativeWindow() const = 0; | 129 virtual gfx::NativeWindow GetNativeWindow() const = 0; |
| 131 virtual void OpenButtonOptions() const = 0; | 130 virtual void OpenButtonOptions() const = 0; |
| 132 virtual bool ShouldOpenButtonOptions() const = 0; | 131 virtual bool ShouldOpenButtonOptions() const = 0; |
| 133 | 132 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 214 |
| 216 // If true, call into the settings UI for network configuration dialogs. | 215 // If true, call into the settings UI for network configuration dialogs. |
| 217 bool use_settings_ui_; | 216 bool use_settings_ui_; |
| 218 | 217 |
| 219 DISALLOW_COPY_AND_ASSIGN(NetworkMenu); | 218 DISALLOW_COPY_AND_ASSIGN(NetworkMenu); |
| 220 }; | 219 }; |
| 221 | 220 |
| 222 } // namespace chromeos | 221 } // namespace chromeos |
| 223 | 222 |
| 224 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ | 223 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ |
| OLD | NEW |