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

Side by Side Diff: ash/system/network/tray_network.cc

Issue 10391182: Fixed proxy settings button behaviour: it becomes disabled when device isn't connected to any netwo… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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
OLDNEW
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
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_cellular_->SetToggled(!delegate->GetCellularEnabled()); 243 button_cellular_->SetToggled(!delegate->GetCellularEnabled());
244 button_cellular_->SetVisible(delegate->GetCellularAvailable()); 244 button_cellular_->SetVisible(delegate->GetCellularAvailable());
245 proxy_settings_->SetEnabled(delegate->Connected());
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 if (tray_) 561 if (tray_)
561 tray_->Update(info); 562 tray_->Update(info);
562 if (default_) 563 if (default_)
563 default_->Update(); 564 default_->Update();
564 if (detailed_) 565 if (detailed_)
565 detailed_->Update(); 566 detailed_->Update();
566 } 567 }
567 568
568 } // namespace internal 569 } // namespace internal
569 } // namespace ash 570 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698