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

Side by Side Diff: chrome/browser/chromeos/login/network_screen.cc

Issue 2053001: Fix crash when opening "Select certificate file" in OOBE. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: added correct way to check for OOBE/login mode Created 10 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) 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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/background_view.cc ('k') | chrome/browser/chromeos/options/network_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698