OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/login/network_screen.h" | 5 #include "chrome/browser/chromeos/login/network_screen.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 delegate()->GetObserver(this)->OnExit(ScreenObserver::NETWORK_CONNECTED); | 196 delegate()->GetObserver(this)->OnExit(ScreenObserver::NETWORK_CONNECTED); |
197 } | 197 } |
198 | 198 |
199 void NetworkScreen::NotifyOnOffline() { | 199 void NetworkScreen::NotifyOnOffline() { |
200 UnsubscribeNetworkNotification(); | 200 UnsubscribeNetworkNotification(); |
201 delegate()->GetObserver(this)->OnExit(ScreenObserver::NETWORK_OFFLINE); | 201 delegate()->GetObserver(this)->OnExit(ScreenObserver::NETWORK_OFFLINE); |
202 } | 202 } |
203 | 203 |
204 void NetworkScreen::OpenPasswordDialog(WifiNetwork network) { | 204 void NetworkScreen::OpenPasswordDialog(WifiNetwork network) { |
205 NetworkConfigView* dialog = new NetworkConfigView(network, true); | 205 NetworkConfigView* dialog = new NetworkConfigView(network, true); |
| 206 dialog->set_browser_mode(false); |
206 views::Window* window = views::Window::CreateChromeWindow( | 207 views::Window* window = views::Window::CreateChromeWindow( |
207 view()->GetNativeWindow(), gfx::Rect(), dialog); | 208 view()->GetNativeWindow(), gfx::Rect(), dialog); |
208 window->SetIsAlwaysOnTop(true); | 209 window->SetIsAlwaysOnTop(true); |
209 window->Show(); | 210 window->Show(); |
210 dialog->SetLoginTextfieldFocus(); | 211 dialog->SetLoginTextfieldFocus(); |
211 } | 212 } |
212 | 213 |
213 void NetworkScreen::SelectNetwork(NetworkList::NetworkType type, | 214 void NetworkScreen::SelectNetwork(NetworkList::NetworkType type, |
214 const string16& id) { | 215 const string16& id) { |
215 int index = networks_.GetNetworkIndexById(type, id); | 216 int index = networks_.GetNetworkIndexById(type, id); |
216 if (index >= 0) { | 217 if (index >= 0) { |
217 view()->SetSelectedNetworkItem(index + 1); | 218 view()->SetSelectedNetworkItem(index + 1); |
218 } else { | 219 } else { |
219 view()->SetSelectedNetworkItem(0); | 220 view()->SetSelectedNetworkItem(0); |
220 } | 221 } |
221 } | 222 } |
222 | 223 |
223 } // namespace chromeos | 224 } // namespace chromeos |
OLD | NEW |