Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: chrome/browser/chromeos/status/network_menu.h

Issue 3923002: Revert 63135 - Update icons to show lowdata and very lowdata for 3G data.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void SetFirstLevelMenuWidth(int width); 107 void SetFirstLevelMenuWidth(int width);
108 108
109 // Cancels the active menu. 109 // Cancels the active menu.
110 void CancelMenu(); 110 void CancelMenu();
111 111
112 // Returns the Icon for a network strength between 0 and 100. 112 // Returns the Icon for a network strength between 0 and 100.
113 // |black| is used to specify whether to return a black icon for display 113 // |black| is used to specify whether to return a black icon for display
114 // on a light background or a white icon for display on a dark background. 114 // on a light background or a white icon for display on a dark background.
115 static SkBitmap IconForNetworkStrength(int strength, bool black); 115 static SkBitmap IconForNetworkStrength(int strength, bool black);
116 116
117 // Returns the Icon for a network strength for CellularNetwork |cellular|.
118 // This returns different colored bars depending on cellular data left.
119 static SkBitmap IconForNetworkStrength(CellularNetwork cellular);
120
121 // This method will convert the |icon| bitmap to the correct size for display. 117 // This method will convert the |icon| bitmap to the correct size for display.
122 // If the |badge| icon is not empty, it will draw that on top of the icon. 118 // If the |badge| icon is not empty, it will draw that on top of the icon.
123 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge); 119 static SkBitmap IconForDisplay(SkBitmap icon, SkBitmap badge);
124 120
125 protected: 121 protected:
126 virtual bool IsBrowserMode() const = 0; 122 virtual bool IsBrowserMode() const = 0;
127 virtual gfx::NativeWindow GetNativeWindow() const = 0; 123 virtual gfx::NativeWindow GetNativeWindow() const = 0;
128 virtual void OpenButtonOptions() const = 0; 124 virtual void OpenButtonOptions() const = 0;
129 virtual bool ShouldOpenButtonOptions() const = 0; 125 virtual bool ShouldOpenButtonOptions() const = 0;
130 126
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 void ShowCellular(const CellularNetwork& cellular, bool focus_login) const; 183 void ShowCellular(const CellularNetwork& cellular, bool focus_login) const;
188 void ShowEthernet(const EthernetNetwork& ethernet) const; 184 void ShowEthernet(const EthernetNetwork& ethernet) const;
189 void ShowOther() const; 185 void ShowOther() const;
190 186
191 // Set to true if we are currently refreshing the menu. 187 // Set to true if we are currently refreshing the menu.
192 bool refreshing_menu_; 188 bool refreshing_menu_;
193 189
194 // The number of wifi strength images. 190 // The number of wifi strength images.
195 static const int kNumWifiImages; 191 static const int kNumWifiImages;
196 192
197 // Bars image resources.
198 static const int kBarsImages[];
199 static const int kBarsImagesBlack[];
200 static const int kBarsImagesLowData[];
201 static const int kBarsImagesVLowData[];
202
203 // Our menu items. 193 // Our menu items.
204 MenuItemVector menu_items_; 194 MenuItemVector menu_items_;
205 195
206 // The network menu. 196 // The network menu.
207 scoped_ptr<views::Menu2> network_menu_; 197 scoped_ptr<views::Menu2> network_menu_;
208 198
209 // Holds minimum width or -1 if it wasn't set up. 199 // Holds minimum width or -1 if it wasn't set up.
210 int min_width_; 200 int min_width_;
211 201
212 DISALLOW_COPY_AND_ASSIGN(NetworkMenu); 202 DISALLOW_COPY_AND_ASSIGN(NetworkMenu);
213 }; 203 };
214 204
215 } // namespace chromeos 205 } // namespace chromeos
216 206
217 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ 207 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/network_message_observer.cc ('k') | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698