| 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 "chrome/browser/ui/webui/chromeos/login/network_dropdown.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 Refresh(); | 119 Refresh(); |
| 120 network_scan_timer_.Start(FROM_HERE, | 120 network_scan_timer_.Start(FROM_HERE, |
| 121 base::TimeDelta::FromSeconds(kNetworkScanIntervalSecs), | 121 base::TimeDelta::FromSeconds(kNetworkScanIntervalSecs), |
| 122 this, &NetworkDropdown::ForceNetworkScan); | 122 this, &NetworkDropdown::ForceNetworkScan); |
| 123 } | 123 } |
| 124 | 124 |
| 125 NetworkDropdown::~NetworkDropdown() { | 125 NetworkDropdown::~NetworkDropdown() { |
| 126 CrosLibrary::Get()->GetNetworkLibrary()->RemoveNetworkManagerObserver(this); | 126 CrosLibrary::Get()->GetNetworkLibrary()->RemoveNetworkManagerObserver(this); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void NetworkDropdown::SetLastNetworkType(ConnectionType last_network_type) { | |
| 130 // No longer implemented. TODO(stevenjb): Purge from JS. | |
| 131 } | |
| 132 | |
| 133 void NetworkDropdown::OnItemChosen(int id) { | 129 void NetworkDropdown::OnItemChosen(int id) { |
| 134 network_menu_->OnItemChosen(id); | 130 network_menu_->OnItemChosen(id); |
| 135 } | 131 } |
| 136 | 132 |
| 137 gfx::NativeWindow NetworkDropdown::GetNativeWindow() const { | 133 gfx::NativeWindow NetworkDropdown::GetNativeWindow() const { |
| 138 return LoginDisplayHostImpl::default_host()->GetNativeWindow(); | 134 return LoginDisplayHostImpl::default_host()->GetNativeWindow(); |
| 139 } | 135 } |
| 140 | 136 |
| 141 void NetworkDropdown::OpenButtonOptions() { | 137 void NetworkDropdown::OpenButtonOptions() { |
| 142 LoginDisplayHostImpl::default_host()->OpenProxySettings(); | 138 LoginDisplayHostImpl::default_host()->OpenProxySettings(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 172 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle", | 168 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle", |
| 173 title, icon); | 169 title, icon); |
| 174 } | 170 } |
| 175 | 171 |
| 176 void NetworkDropdown::ForceNetworkScan() { | 172 void NetworkDropdown::ForceNetworkScan() { |
| 177 CrosLibrary::Get()->GetNetworkLibrary()->RequestNetworkScan(); | 173 CrosLibrary::Get()->GetNetworkLibrary()->RequestNetworkScan(); |
| 178 Refresh(); | 174 Refresh(); |
| 179 } | 175 } |
| 180 | 176 |
| 181 } // namespace chromeos | 177 } // namespace chromeos |
| OLD | NEW |