| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 return (menu_items_[index].flags & FLAG_ASSOCIATED) ? | 272 return (menu_items_[index].flags & FLAG_ASSOCIATED) ? |
| 273 &ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BoldFont) : | 273 &ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BoldFont) : |
| 274 NULL; | 274 NULL; |
| 275 } | 275 } |
| 276 | 276 |
| 277 bool NetworkMenu::IsItemCheckedAt(int index) const { | 277 bool NetworkMenu::IsItemCheckedAt(int index) const { |
| 278 // All ui::MenuModel::TYPE_CHECK menu items are checked. | 278 // All ui::MenuModel::TYPE_CHECK menu items are checked. |
| 279 return true; | 279 return true; |
| 280 } | 280 } |
| 281 | 281 |
| 282 bool NetworkMenu::GetIconAt(int index, SkBitmap* icon) const { | 282 bool NetworkMenu::GetIconAt(int index, SkBitmap* icon) { |
| 283 if (!menu_items_[index].icon.empty()) { | 283 if (!menu_items_[index].icon.empty()) { |
| 284 *icon = menu_items_[index].icon; | 284 *icon = menu_items_[index].icon; |
| 285 return true; | 285 return true; |
| 286 } | 286 } |
| 287 return false; | 287 return false; |
| 288 } | 288 } |
| 289 | 289 |
| 290 bool NetworkMenu::IsEnabledAt(int index) const { | 290 bool NetworkMenu::IsEnabledAt(int index) const { |
| 291 return !(menu_items_[index].flags & FLAG_DISABLED); | 291 return !(menu_items_[index].flags & FLAG_DISABLED); |
| 292 } | 292 } |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 if (!browser) | 811 if (!browser) |
| 812 return; | 812 return; |
| 813 browser->OpenMobilePlanTabAndActivate(); | 813 browser->OpenMobilePlanTabAndActivate(); |
| 814 } | 814 } |
| 815 | 815 |
| 816 void NetworkMenu::ShowOther() const { | 816 void NetworkMenu::ShowOther() const { |
| 817 ShowNetworkConfigView(new NetworkConfigView()); | 817 ShowNetworkConfigView(new NetworkConfigView()); |
| 818 } | 818 } |
| 819 | 819 |
| 820 } // namespace chromeos | 820 } // namespace chromeos |
| OLD | NEW |