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

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: Fix, sync. 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
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698