OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/system/network/tray_network.h" | 5 #include "ash/system/network/tray_network.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 IDR_AURA_UBER_TRAY_NETWORK_INFO_HOVER, | 235 IDR_AURA_UBER_TRAY_NETWORK_INFO_HOVER, |
236 IDR_AURA_UBER_TRAY_NETWORK_INFO_HOVER); | 236 IDR_AURA_UBER_TRAY_NETWORK_INFO_HOVER); |
237 footer()->AddButton(info_icon_); | 237 footer()->AddButton(info_icon_); |
238 } | 238 } |
239 | 239 |
240 void UpdateHeaderButtons() { | 240 void UpdateHeaderButtons() { |
241 SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate(); | 241 SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate(); |
242 button_wifi_->SetToggled(!delegate->GetWifiEnabled()); | 242 button_wifi_->SetToggled(!delegate->GetWifiEnabled()); |
243 button_mobile_->SetToggled(!delegate->GetMobileEnabled()); | 243 button_mobile_->SetToggled(!delegate->GetMobileEnabled()); |
244 button_mobile_->SetVisible(delegate->GetMobileAvailable()); | 244 button_mobile_->SetVisible(delegate->GetMobileAvailable()); |
| 245 proxy_settings_->SetEnabled(delegate->IsNetworkConnected()); |
245 } | 246 } |
246 | 247 |
247 void AppendNetworkEntries() { | 248 void AppendNetworkEntries() { |
248 CreateScrollableList(); | 249 CreateScrollableList(); |
249 | 250 |
250 HoverHighlightView* container = new HoverHighlightView(this); | 251 HoverHighlightView* container = new HoverHighlightView(this); |
251 container->set_fixed_height(kTrayPopupItemHeight); | 252 container->set_fixed_height(kTrayPopupItemHeight); |
252 container->AddLabel(ui::ResourceBundle::GetSharedInstance(). | 253 container->AddLabel(ui::ResourceBundle::GetSharedInstance(). |
253 GetLocalizedString(IDS_ASH_STATUS_TRAY_MOBILE_VIEW_ACCOUNT), | 254 GetLocalizedString(IDS_ASH_STATUS_TRAY_MOBILE_VIEW_ACCOUNT), |
254 gfx::Font::NORMAL); | 255 gfx::Font::NORMAL); |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 if (tray_) | 563 if (tray_) |
563 tray_->Update(info); | 564 tray_->Update(info); |
564 if (default_) | 565 if (default_) |
565 default_->Update(); | 566 default_->Update(); |
566 if (detailed_) | 567 if (detailed_) |
567 detailed_->Update(); | 568 detailed_->Update(); |
568 } | 569 } |
569 | 570 |
570 } // namespace internal | 571 } // namespace internal |
571 } // namespace ash | 572 } // namespace ash |
OLD | NEW |