OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/lock/webui_screen_locker.h" | 5 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/lock_state_controller.h" | 8 #include "ash/wm/lock_state_controller.h" |
9 #include "ash/wm/lock_state_observer.h" | 9 #include "ash/wm/lock_state_observer.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/browser_shutdown.h" | 14 #include "chrome/browser/browser_shutdown.h" |
15 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
17 #include "chrome/browser/chromeos/login/helper.h" | 17 #include "chrome/browser/chromeos/login/helper.h" |
18 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 18 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
19 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 19 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
20 #include "chrome/browser/chromeos/login/users/user.h" | |
21 #include "chrome/browser/chromeos/login/users/user_manager.h" | 20 #include "chrome/browser/chromeos/login/users/user_manager.h" |
22 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 21 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
23 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 22 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
24 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
25 #include "chromeos/dbus/dbus_thread_manager.h" | 24 #include "chromeos/dbus/dbus_thread_manager.h" |
| 25 #include "components/user_manager/user.h" |
26 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
27 #include "content/public/browser/notification_service.h" | 27 #include "content/public/browser/notification_service.h" |
28 #include "content/public/browser/notification_types.h" | 28 #include "content/public/browser/notification_types.h" |
29 #include "content/public/browser/render_widget_host_view.h" | 29 #include "content/public/browser/render_widget_host_view.h" |
30 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
31 #include "ui/aura/client/capture_client.h" | 31 #include "ui/aura/client/capture_client.h" |
32 #include "ui/aura/window_event_dispatcher.h" | 32 #include "ui/aura/window_event_dispatcher.h" |
33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
34 #include "ui/base/x/x11_util.h" | 34 #include "ui/base/x/x11_util.h" |
35 #include "ui/gfx/screen.h" | 35 #include "ui/gfx/screen.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 //////////////////////////////////////////////////////////////////////////////// | 204 //////////////////////////////////////////////////////////////////////////////// |
205 // WebUIScreenLocker, content::NotificationObserver implementation: | 205 // WebUIScreenLocker, content::NotificationObserver implementation: |
206 | 206 |
207 void WebUIScreenLocker::Observe( | 207 void WebUIScreenLocker::Observe( |
208 int type, | 208 int type, |
209 const content::NotificationSource& source, | 209 const content::NotificationSource& source, |
210 const content::NotificationDetails& details) { | 210 const content::NotificationDetails& details) { |
211 switch (type) { | 211 switch (type) { |
212 case chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED: { | 212 case chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED: { |
213 const User& user = *content::Details<User>(details).ptr(); | 213 const user_manager::User& user = |
| 214 *content::Details<user_manager::User>(details).ptr(); |
214 login_display_->OnUserImageChanged(user); | 215 login_display_->OnUserImageChanged(user); |
215 break; | 216 break; |
216 } | 217 } |
217 default: | 218 default: |
218 WebUILoginView::Observe(type, source, details); | 219 WebUILoginView::Observe(type, source, details); |
219 } | 220 } |
220 } | 221 } |
221 | 222 |
222 //////////////////////////////////////////////////////////////////////////////// | 223 //////////////////////////////////////////////////////////////////////////////// |
223 // WebUIScreenLocker, LoginDisplay::Delegate implementation: | 224 // WebUIScreenLocker, LoginDisplay::Delegate implementation: |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); | 380 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); |
380 if (login::LoginScrollIntoViewEnabled()) | 381 if (login::LoginScrollIntoViewEnabled()) |
381 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true, new_bounds); | 382 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true, new_bounds); |
382 } | 383 } |
383 } | 384 } |
384 | 385 |
385 keyboard_bounds_ = new_bounds; | 386 keyboard_bounds_ = new_bounds; |
386 } | 387 } |
387 | 388 |
388 } // namespace chromeos | 389 } // namespace chromeos |
OLD | NEW |