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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const int NetworkMenu::kBarsImagesVLowData[kNumBarsImages] = { | 75 const int NetworkMenu::kBarsImagesVLowData[kNumBarsImages] = { |
76 IDR_STATUSBAR_NETWORK_BARS1_RED, | 76 IDR_STATUSBAR_NETWORK_BARS1_RED, |
77 IDR_STATUSBAR_NETWORK_BARS2_RED, | 77 IDR_STATUSBAR_NETWORK_BARS2_RED, |
78 IDR_STATUSBAR_NETWORK_BARS3_RED, | 78 IDR_STATUSBAR_NETWORK_BARS3_RED, |
79 IDR_STATUSBAR_NETWORK_BARS4_RED, | 79 IDR_STATUSBAR_NETWORK_BARS4_RED, |
80 }; | 80 }; |
81 */ | 81 */ |
82 | 82 |
83 NetworkMenu::NetworkMenu() | 83 NetworkMenu::NetworkMenu() |
84 : min_width_(-1) { | 84 : min_width_(-1) { |
85 use_settings_ui_ = CommandLine::ForCurrentProcess()->HasSwitch( | 85 use_settings_ui_ = !CommandLine::ForCurrentProcess()->HasSwitch( |
86 switches::kEnableTabbedOptions); | 86 switches::kDisableTabbedOptions); |
87 network_menu_.reset(NetworkMenuUI::CreateMenu2(this)); | 87 network_menu_.reset(NetworkMenuUI::CreateMenu2(this)); |
88 } | 88 } |
89 | 89 |
90 NetworkMenu::~NetworkMenu() { | 90 NetworkMenu::~NetworkMenu() { |
91 } | 91 } |
92 | 92 |
93 bool NetworkMenu::GetNetworkAt(int index, NetworkInfo* info) const { | 93 bool NetworkMenu::GetNetworkAt(int index, NetworkInfo* info) const { |
94 DCHECK(info); | 94 DCHECK(info); |
95 bool res = true; // True unless a network doesn't exist. | 95 bool res = true; // True unless a network doesn't exist. |
96 int flags = menu_items_[index].flags; | 96 int flags = menu_items_[index].flags; |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 chrome::kInternetOptionsSubPage, | 749 chrome::kInternetOptionsSubPage, |
750 chromeos::TYPE_WIFI); | 750 chromeos::TYPE_WIFI); |
751 browser->ShowOptionsTab(page); | 751 browser->ShowOptionsTab(page); |
752 } | 752 } |
753 } else { | 753 } else { |
754 ShowNetworkConfigView(new NetworkConfigView()); | 754 ShowNetworkConfigView(new NetworkConfigView()); |
755 } | 755 } |
756 } | 756 } |
757 | 757 |
758 } // namespace chromeos | 758 } // namespace chromeos |
OLD | NEW |