| 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/ui/views/dom_view.h" | 23 #include "chrome/browser/ui/views/dom_view.h" |
| 24 #include "chrome/common/render_messages.h" | 24 #include "chrome/common/render_messages.h" |
| 25 #include "content/browser/renderer_host/render_view_host_observer.h" | 25 #include "content/browser/renderer_host/render_view_host_observer.h" |
| 26 #include "content/browser/tab_contents/tab_contents.h" | 26 #include "content/browser/tab_contents/tab_contents.h" |
| 27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
| 28 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
| 29 #include "views/desktop/desktop_window_view.h" | 29 #include "views/desktop/desktop_window_view.h" |
| 30 #include "views/widget/native_widget_gtk.h" | 30 #include "views/widget/native_widget_gtk.h" |
| 31 #include "views/widget/widget.h" | 31 #include "views/widget/widget.h" |
| 32 | 32 |
| 33 #if defined(TOUCH_UI) | 33 #if defined(USE_VIRTUAL_KEYBOARD) |
| 34 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" | 34 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 const char kViewClassName[] = "browser/chromeos/login/WebUILoginView"; | 39 const char kViewClassName[] = "browser/chromeos/login/WebUILoginView"; |
| 40 | 40 |
| 41 // These strings must be kept in sync with handleAccelerator() in oobe.js. | 41 // These strings must be kept in sync with handleAccelerator() in oobe.js. |
| 42 const char kAccelNameAccessibility[] = "accessibility"; | 42 const char kAccelNameAccessibility[] = "accessibility"; |
| 43 const char kAccelNameCancel[] = "cancel"; | 43 const char kAccelNameCancel[] = "cancel"; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 const int WebUILoginView::kStatusAreaCornerPadding = 5; | 104 const int WebUILoginView::kStatusAreaCornerPadding = 5; |
| 105 | 105 |
| 106 // WebUILoginView public: ------------------------------------------------------ | 106 // WebUILoginView public: ------------------------------------------------------ |
| 107 | 107 |
| 108 WebUILoginView::WebUILoginView() | 108 WebUILoginView::WebUILoginView() |
| 109 : status_area_(NULL), | 109 : status_area_(NULL), |
| 110 webui_login_(NULL), | 110 webui_login_(NULL), |
| 111 status_window_(NULL), | 111 status_window_(NULL), |
| 112 host_window_frozen_(false), | 112 host_window_frozen_(false), |
| 113 status_area_visibility_on_init_(true) { | 113 status_area_visibility_on_init_(true) { |
| 114 #if defined(TOUCH_UI) | 114 #if defined(USE_VIRTUAL_KEYBOARD) |
| 115 // Make sure the singleton VirtualKeyboardManager object is created. | 115 // Make sure the singleton VirtualKeyboardManager object is created. |
| 116 VirtualKeyboardManager::GetInstance(); | 116 VirtualKeyboardManager::GetInstance(); |
| 117 #endif | 117 #endif |
| 118 accel_map_[views::Accelerator(ui::VKEY_Z, false, true, true)] = | 118 accel_map_[views::Accelerator(ui::VKEY_Z, false, true, true)] = |
| 119 kAccelNameAccessibility; | 119 kAccelNameAccessibility; |
| 120 accel_map_[views::Accelerator(ui::VKEY_ESCAPE, false, false, false)] = | 120 accel_map_[views::Accelerator(ui::VKEY_ESCAPE, false, false, false)] = |
| 121 kAccelNameCancel; | 121 kAccelNameCancel; |
| 122 accel_map_[views::Accelerator(ui::VKEY_E, false, true, true)] = | 122 accel_map_[views::Accelerator(ui::VKEY_E, false, true, true)] = |
| 123 kAccelNameEnrollment; | 123 kAccelNameEnrollment; |
| 124 | 124 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 GetFocusManager()); | 387 GetFocusManager()); |
| 388 | 388 |
| 389 // Make sure error bubble is cleared on keyboard event. This is needed | 389 // Make sure error bubble is cleared on keyboard event. This is needed |
| 390 // when the focus is inside an iframe. | 390 // when the focus is inside an iframe. |
| 391 WebUI* web_ui = GetWebUI(); | 391 WebUI* web_ui = GetWebUI(); |
| 392 if (web_ui) | 392 if (web_ui) |
| 393 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 393 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace chromeos | 396 } // namespace chromeos |
| OLD | NEW |