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" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 12 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
13 #include "chrome/browser/chromeos/cros/cros_library.h" | 13 #include "chrome/browser/chromeos/cros/cros_library.h" |
14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
15 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 15 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" | 16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" |
17 #include "chrome/browser/chromeos/login/webui_login_display.h" | 17 #include "chrome/browser/chromeos/login/webui_login_display.h" |
18 #include "chrome/browser/chromeos/status/status_area_view.h" | 18 #include "chrome/browser/chromeos/status/status_area_view.h" |
19 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" | 19 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
20 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profile_manager.h" |
21 #include "chrome/browser/ui/views/dom_view.h" | 21 #include "chrome/browser/ui/views/dom_view.h" |
22 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 22 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
23 #include "chrome/common/render_messages.h" | 23 #include "chrome/common/render_messages.h" |
| 24 #include "content/browser/webui/web_ui.h" |
24 #include "content/public/browser/render_view_host_observer.h" | 25 #include "content/public/browser/render_view_host_observer.h" |
25 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
26 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
27 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
28 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
29 | 30 |
30 #if defined(TOOLKIT_USES_GTK) | 31 #if defined(TOOLKIT_USES_GTK) |
31 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" | 32 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" |
32 #include "ui/views/widget/native_widget_gtk.h" | 33 #include "ui/views/widget/native_widget_gtk.h" |
33 #endif | 34 #endif |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // In aura, there will be no window-manager. So chrome needs to emit the | 311 // In aura, there will be no window-manager. So chrome needs to emit the |
311 // 'login-prompt-visible' signal. This needs to happen here, after the page | 312 // 'login-prompt-visible' signal. This needs to happen here, after the page |
312 // has completed rendering itself. | 313 // has completed rendering itself. |
313 #if defined(USE_AURA) | 314 #if defined(USE_AURA) |
314 emit_login_visible = true; | 315 emit_login_visible = true; |
315 #endif | 316 #endif |
316 if (emit_login_visible) | 317 if (emit_login_visible) |
317 chromeos::DBusThreadManager::Get()->GetSessionManagerClient() | 318 chromeos::DBusThreadManager::Get()->GetSessionManagerClient() |
318 ->EmitLoginPromptVisible(); | 319 ->EmitLoginPromptVisible(); |
319 | 320 |
320 OobeUI* oobe_ui = static_cast<OobeUI*>(GetWebUI()); | 321 OobeUI* oobe_ui = static_cast<OobeUI*>(GetWebUI()->GetController()); |
321 // Notify OOBE that the login frame has been rendered. Currently | 322 // Notify OOBE that the login frame has been rendered. Currently |
322 // this is used to start camera presence check. | 323 // this is used to start camera presence check. |
323 oobe_ui->OnLoginPromptVisible(); | 324 oobe_ui->OnLoginPromptVisible(); |
324 } | 325 } |
325 | 326 |
326 void WebUILoginView::InitStatusArea() { | 327 void WebUILoginView::InitStatusArea() { |
327 DCHECK(status_area_ == NULL); | 328 DCHECK(status_area_ == NULL); |
328 DCHECK(status_window_ == NULL); | 329 DCHECK(status_window_ == NULL); |
329 StatusAreaViewChromeos* status_area_chromeos = new StatusAreaViewChromeos(); | 330 StatusAreaViewChromeos* status_area_chromeos = new StatusAreaViewChromeos(); |
330 status_area_chromeos->Init(this); | 331 status_area_chromeos->Init(this); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding | 422 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding |
422 // an immediate authentication error (See crbug.com/103643). | 423 // an immediate authentication error (See crbug.com/103643). |
423 if (event.type == WebKit::WebInputEvent::KeyDown) { | 424 if (event.type == WebKit::WebInputEvent::KeyDown) { |
424 WebUI* web_ui = GetWebUI(); | 425 WebUI* web_ui = GetWebUI(); |
425 if (web_ui) | 426 if (web_ui) |
426 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 427 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
427 } | 428 } |
428 } | 429 } |
429 | 430 |
430 } // namespace chromeos | 431 } // namespace chromeos |
OLD | NEW |