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 "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 !view()->is_dialog_open() && | 150 !view()->is_dialog_open() && |
151 !(help_app_.get() && help_app_->is_open())) { | 151 !(help_app_.get() && help_app_->is_open())) { |
152 // Show error bubble. | 152 // Show error bubble. |
153 ClearErrors(); | 153 ClearErrors(); |
154 views::View* network_control = view()->GetNetworkControlView(); | 154 views::View* network_control = view()->GetNetworkControlView(); |
155 bubble_ = MessageBubble::Show( | 155 bubble_ = MessageBubble::Show( |
156 network_control->GetWidget(), | 156 network_control->GetWidget(), |
157 network_control->GetScreenBounds(), | 157 network_control->GetScreenBounds(), |
158 BubbleBorder::LEFT_TOP, | 158 BubbleBorder::LEFT_TOP, |
159 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING), | 159 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING), |
160 l10n_util::GetStringF(IDS_NETWORK_SELECTION_ERROR, | 160 UTF16ToWide(l10n_util::GetStringFUTF16( |
161 l10n_util::GetString(IDS_PRODUCT_OS_NAME), | 161 IDS_NETWORK_SELECTION_ERROR, |
162 UTF16ToWide(network_id_)), | 162 l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME), |
163 l10n_util::GetString(IDS_NETWORK_SELECTION_ERROR_HELP), | 163 network_id_)), |
| 164 UTF16ToWide( |
| 165 l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_ERROR_HELP)), |
164 this); | 166 this); |
165 network_control->RequestFocus(); | 167 network_control->RequestFocus(); |
166 } | 168 } |
167 } | 169 } |
168 | 170 |
169 void NetworkScreen::UpdateStatus(NetworkLibrary* network) { | 171 void NetworkScreen::UpdateStatus(NetworkLibrary* network) { |
170 if (!view() || !network) | 172 if (!view() || !network) |
171 return; | 173 return; |
172 | 174 |
173 if (network->Connected()) | 175 if (network->Connected()) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 &NetworkScreen::OnConnectionTimeout); | 218 &NetworkScreen::OnConnectionTimeout); |
217 } | 219 } |
218 | 220 |
219 network_id_ = network_id; | 221 network_id_ = network_id; |
220 view()->ShowConnectingStatus(continue_pressed_, network_id_); | 222 view()->ShowConnectingStatus(continue_pressed_, network_id_); |
221 | 223 |
222 view()->EnableContinue(false); | 224 view()->EnableContinue(false); |
223 } | 225 } |
224 | 226 |
225 } // namespace chromeos | 227 } // namespace chromeos |
OLD | NEW |