OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
16 #include "chrome/browser/chromeos/cros/cros_library.h" | 16 #include "chrome/browser/chromeos/cros/cros_library.h" |
17 #include "chrome/browser/chromeos/login/login_display_host_impl.h" | 17 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
18 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" | 18 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" |
19 #include "chrome/browser/chromeos/login/webui_login_display.h" | 19 #include "chrome/browser/chromeos/login/webui_login_display.h" |
20 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 20 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
21 #include "chrome/browser/media/media_stream_infobar_delegate.h" | 21 #include "chrome/browser/media/media_stream_infobar_delegate.h" |
22 #include "chrome/browser/password_manager/password_manager.h" | 22 #include "chrome/browser/password_manager/password_manager.h" |
23 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" | 23 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" |
24 #include "chrome/browser/renderer_preferences_util.h" | 24 #include "chrome/browser/renderer_preferences_util.h" |
25 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | |
26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 25 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
27 #include "chrome/common/chrome_notification_types.h" | 26 #include "chrome/common/chrome_notification_types.h" |
28 #include "chrome/common/render_messages.h" | 27 #include "chrome/common/render_messages.h" |
29 #include "chromeos/dbus/dbus_thread_manager.h" | 28 #include "chromeos/dbus/dbus_thread_manager.h" |
30 #include "chromeos/dbus/session_manager_client.h" | 29 #include "chromeos/dbus/session_manager_client.h" |
| 30 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
31 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
32 #include "content/public/browser/render_view_host.h" | 32 #include "content/public/browser/render_view_host.h" |
33 #include "content/public/browser/render_view_host_observer.h" | 33 #include "content/public/browser/render_view_host_observer.h" |
34 #include "content/public/browser/render_widget_host_view.h" | 34 #include "content/public/browser/render_widget_host_view.h" |
35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
36 #include "content/public/browser/web_contents_view.h" | 36 #include "content/public/browser/web_contents_view.h" |
37 #include "content/public/browser/web_ui.h" | 37 #include "content/public/browser/web_ui.h" |
38 #include "ui/aura/env.h" | 38 #include "ui/aura/env.h" |
39 #include "ui/gfx/rect.h" | 39 #include "ui/gfx/rect.h" |
40 #include "ui/gfx/size.h" | 40 #include "ui/gfx/size.h" |
41 #include "ui/views/controls/webview/webview.h" | 41 #include "ui/views/controls/webview/webview.h" |
42 #include "ui/views/widget/widget.h" | 42 #include "ui/views/widget/widget.h" |
43 | 43 |
44 using content::NativeWebKeyboardEvent; | 44 using content::NativeWebKeyboardEvent; |
45 using content::RenderViewHost; | 45 using content::RenderViewHost; |
46 using content::WebContents; | 46 using content::WebContents; |
| 47 using web_modal::WebContentsModalDialogManager; |
47 | 48 |
48 namespace { | 49 namespace { |
49 | 50 |
50 // These strings must be kept in sync with handleAccelerator() in oobe.js. | 51 // These strings must be kept in sync with handleAccelerator() in oobe.js. |
51 const char kAccelNameCancel[] = "cancel"; | 52 const char kAccelNameCancel[] = "cancel"; |
52 const char kAccelNameEnrollment[] = "enrollment"; | 53 const char kAccelNameEnrollment[] = "enrollment"; |
53 const char kAccelNameVersion[] = "version"; | 54 const char kAccelNameVersion[] = "version"; |
54 const char kAccelNameReset[] = "reset"; | 55 const char kAccelNameReset[] = "reset"; |
55 const char kAccelNameLeft[] = "left"; | 56 const char kAccelNameLeft[] = "left"; |
56 const char kAccelNameRight[] = "right"; | 57 const char kAccelNameRight[] = "right"; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 aura::Env::GetInstance()->set_render_white_bg(true); | 417 aura::Env::GetInstance()->set_render_white_bg(true); |
417 } | 418 } |
418 | 419 |
419 void WebUILoginView::ReturnFocus(bool reverse) { | 420 void WebUILoginView::ReturnFocus(bool reverse) { |
420 // Return the focus to the web contents. | 421 // Return the focus to the web contents. |
421 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 422 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
422 GetWidget()->Activate(); | 423 GetWidget()->Activate(); |
423 } | 424 } |
424 | 425 |
425 } // namespace chromeos | 426 } // namespace chromeos |
OLD | NEW |