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

Unified Diff: ash/common/system/chromeos/network/network_state_list_detailed_view.cc

Issue 2692943005: [ash-md] Disables proxy settings button when there are no networks (Closed)
Patch Set: [ash-md] Disables proxy settings button when there are no networks (comments) Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/chromeos/network/network_state_list_detailed_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/network_state_list_detailed_view.cc
diff --git a/ash/common/system/chromeos/network/network_state_list_detailed_view.cc b/ash/common/system/chromeos/network/network_state_list_detailed_view.cc
index 3a5ce73eb6d51793b15ab0a0712134daca5daf5e..9e2e72e28586b678b17c142efe52fc76968fef07 100644
--- a/ash/common/system/chromeos/network/network_state_list_detailed_view.cc
+++ b/ash/common/system/chromeos/network/network_state_list_detailed_view.cc
@@ -348,6 +348,7 @@ NetworkStateListDetailedView::~NetworkStateListDetailedView() {
void NetworkStateListDetailedView::Update() {
UpdateNetworkList();
+ UpdateHeaderButtons();
Layout();
}
@@ -528,6 +529,14 @@ void NetworkStateListDetailedView::UpdateNetworkList() {
network_list_view_->Update();
}
+void NetworkStateListDetailedView::UpdateHeaderButtons() {
+ if (proxy_settings_button_md_) {
+ proxy_settings_button_md_->SetEnabled(
+ NetworkHandler::Get()->network_state_handler()->DefaultNetwork() !=
+ nullptr);
+ }
+}
+
bool NetworkStateListDetailedView::OrderChild(views::View* view, int index) {
if (scroll_content()->child_at(index) != view) {
scroll_content()->ReorderChildView(view, index);
« no previous file with comments | « ash/common/system/chromeos/network/network_state_list_detailed_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698