OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/webui_login_view.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 void WebUILoginView::ChildPreferredSizeChanged(View* child) { | 228 void WebUILoginView::ChildPreferredSizeChanged(View* child) { |
229 Layout(); | 229 Layout(); |
230 SchedulePaint(); | 230 SchedulePaint(); |
231 } | 231 } |
232 | 232 |
233 // Overridden from StatusAreaButton::Delegate: | 233 // Overridden from StatusAreaButton::Delegate: |
234 | 234 |
235 bool WebUILoginView::ShouldExecuteStatusAreaCommand( | 235 bool WebUILoginView::ShouldExecuteStatusAreaCommand( |
236 const views::View* button_view, int command_id) const { | 236 const views::View* button_view, int command_id) const { |
237 if (command_id == StatusAreaViewChromeos::SHOW_NETWORK_OPTIONS) | 237 if (command_id == StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS) |
238 return true; | 238 return true; |
239 return false; | 239 return false; |
240 } | 240 } |
241 | 241 |
242 void WebUILoginView::ExecuteStatusAreaCommand( | 242 void WebUILoginView::ExecuteStatusAreaCommand( |
243 const views::View* button_view, int command_id) { | 243 const views::View* button_view, int command_id) { |
244 if (command_id == StatusAreaViewChromeos::SHOW_NETWORK_OPTIONS) { | 244 if (command_id == StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS) { |
245 if (proxy_settings_dialog_.get() == NULL) { | 245 if (proxy_settings_dialog_.get() == NULL) { |
246 proxy_settings_dialog_.reset(new ProxySettingsDialog( | 246 proxy_settings_dialog_.reset(new ProxySettingsDialog( |
247 this, GetNativeWindow())); | 247 this, GetNativeWindow())); |
248 } | 248 } |
249 proxy_settings_dialog_->Show(); | 249 proxy_settings_dialog_->Show(); |
250 } | 250 } |
251 } | 251 } |
252 | 252 |
253 gfx::Font WebUILoginView::GetStatusAreaFont(const gfx::Font& font) const { | 253 gfx::Font WebUILoginView::GetStatusAreaFont(const gfx::Font& font) const { |
254 return font; | 254 return font; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding | 409 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding |
410 // an immediate authentication error (See crbug.com/103643). | 410 // an immediate authentication error (See crbug.com/103643). |
411 if (event.type == WebKit::WebInputEvent::KeyDown) { | 411 if (event.type == WebKit::WebInputEvent::KeyDown) { |
412 WebUI* web_ui = GetWebUI(); | 412 WebUI* web_ui = GetWebUI(); |
413 if (web_ui) | 413 if (web_ui) |
414 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 414 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
415 } | 415 } |
416 } | 416 } |
417 | 417 |
418 } // namespace chromeos | 418 } // namespace chromeos |
OLD | NEW |