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 #include "chrome/browser/chromeos/status/network_menu.h" | 5 #include "chrome/browser/chromeos/status/network_menu.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } else { | 160 } else { |
161 // TODO(stevenjb): Connection in progress. Show dialog? | 161 // TODO(stevenjb): Connection in progress. Show dialog? |
162 } | 162 } |
163 } else { | 163 } else { |
164 cros->ConnectToCellularNetwork(cellular); | 164 cros->ConnectToCellularNetwork(cellular); |
165 } | 165 } |
166 } | 166 } |
167 } | 167 } |
168 | 168 |
169 void NetworkMenu::SetFirstLevelMenuWidth(int width) { | 169 void NetworkMenu::SetFirstLevelMenuWidth(int width) { |
170 gtk_widget_set_size_request(network_menu_.GetNativeMenu(), width, -1); | 170 network_menu_.SetMinimumWidth(width); |
171 } | 171 } |
172 | 172 |
173 void NetworkMenu::CancelMenu() { | 173 void NetworkMenu::CancelMenu() { |
174 network_menu_.CancelMenu(); | 174 network_menu_.CancelMenu(); |
175 } | 175 } |
176 | 176 |
177 // static | 177 // static |
178 SkBitmap NetworkMenu::IconForNetworkStrength(int strength, bool black) { | 178 SkBitmap NetworkMenu::IconForNetworkStrength(int strength, bool black) { |
179 // Compose wifi icon by superimposing various icons. | 179 // Compose wifi icon by superimposing various icons. |
180 // NOTE: Use an array rather than just calculating a resource number to avoid | 180 // NOTE: Use an array rather than just calculating a resource number to avoid |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 if (ShouldOpenButtonOptions()) { | 351 if (ShouldOpenButtonOptions()) { |
352 label = | 352 label = |
353 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_OPEN_OPTIONS_DIALOG); | 353 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_OPEN_OPTIONS_DIALOG); |
354 menu_items_.push_back(MenuItem(menus::MenuModel::TYPE_COMMAND, label, | 354 menu_items_.push_back(MenuItem(menus::MenuModel::TYPE_COMMAND, label, |
355 SkBitmap(), std::string(), FLAG_OPTIONS)); | 355 SkBitmap(), std::string(), FLAG_OPTIONS)); |
356 } | 356 } |
357 } | 357 } |
358 } | 358 } |
359 | 359 |
360 } // namespace chromeos | 360 } // namespace chromeos |
OLD | NEW |