| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // This returns different colored bars depending on cellular data left. | 120 // This returns different colored bars depending on cellular data left. |
| 121 static SkBitmap IconForNetworkStrength(const CellularNetwork* cellular); | 121 static SkBitmap IconForNetworkStrength(const CellularNetwork* cellular); |
| 122 | 122 |
| 123 // 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. |
| 124 // 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. |
| 125 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge); | 125 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge); |
| 126 | 126 |
| 127 protected: | 127 protected: |
| 128 virtual bool IsBrowserMode() const = 0; | 128 virtual bool IsBrowserMode() const = 0; |
| 129 virtual gfx::NativeWindow GetNativeWindow() const = 0; | 129 virtual gfx::NativeWindow GetNativeWindow() const = 0; |
| 130 virtual void OpenButtonOptions() const = 0; | 130 virtual void OpenButtonOptions() = 0; |
| 131 virtual bool ShouldOpenButtonOptions() const = 0; | 131 virtual bool ShouldOpenButtonOptions() const = 0; |
| 132 | 132 |
| 133 // Notify subclasses that connection to |network| was initiated. | 133 // Notify subclasses that connection to |network| was initiated. |
| 134 virtual void OnConnectNetwork(const Network* network, | 134 virtual void OnConnectNetwork(const Network* network, |
| 135 SkBitmap selected_icon_) {} | 135 SkBitmap selected_icon_) {} |
| 136 // Update the menu (e.g. when the network list or status has changed). | 136 // Update the menu (e.g. when the network list or status has changed). |
| 137 void UpdateMenu(); | 137 void UpdateMenu(); |
| 138 | 138 |
| 139 private: | 139 private: |
| 140 enum MenuItemFlags { | 140 enum MenuItemFlags { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 // If true, call into the settings UI for network configuration dialogs. | 215 // If true, call into the settings UI for network configuration dialogs. |
| 216 bool use_settings_ui_; | 216 bool use_settings_ui_; |
| 217 | 217 |
| 218 DISALLOW_COPY_AND_ASSIGN(NetworkMenu); | 218 DISALLOW_COPY_AND_ASSIGN(NetworkMenu); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 } // namespace chromeos | 221 } // namespace chromeos |
| 222 | 222 |
| 223 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ | 223 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ |
| OLD | NEW |