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/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/wallpaper/wallpaper_controller.h" | 10 #include "ash/common/wallpaper/wallpaper_controller.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 #include "components/user_manager/user_type.h" | 56 #include "components/user_manager/user_type.h" |
57 #include "content/public/browser/browser_thread.h" | 57 #include "content/public/browser/browser_thread.h" |
58 #include "content/public/browser/notification_service.h" | 58 #include "content/public/browser/notification_service.h" |
59 #include "content/public/browser/url_data_source.h" | 59 #include "content/public/browser/url_data_source.h" |
60 #include "content/public/browser/user_metrics.h" | 60 #include "content/public/browser/user_metrics.h" |
61 #include "content/public/browser/web_contents.h" | 61 #include "content/public/browser/web_contents.h" |
62 #include "content/public/browser/web_ui.h" | 62 #include "content/public/browser/web_ui.h" |
63 #include "media/audio/sounds/sounds_manager.h" | 63 #include "media/audio/sounds/sounds_manager.h" |
64 #include "ui/base/resource/resource_bundle.h" | 64 #include "ui/base/resource/resource_bundle.h" |
65 #include "ui/gfx/image/image.h" | 65 #include "ui/gfx/image/image.h" |
66 #include "ui/keyboard/keyboard_util.h" | |
66 #include "url/gurl.h" | 67 #include "url/gurl.h" |
67 | 68 |
68 using base::UserMetricsAction; | 69 using base::UserMetricsAction; |
69 using content::BrowserThread; | 70 using content::BrowserThread; |
70 | 71 |
71 namespace chromeos { | 72 namespace chromeos { |
72 | 73 |
73 namespace { | 74 namespace { |
74 | 75 |
75 // Timeout for unlock animation guard - some animations may be required to run | 76 // Timeout for unlock animation guard - some animations may be required to run |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 content::Source<ScreenLocker>(this), | 508 content::Source<ScreenLocker>(this), |
508 content::Details<bool>(&state)); | 509 content::Details<bool>(&state)); |
509 | 510 |
510 VLOG(1) << "Calling session manager's HandleLockScreenDismissed D-Bus method"; | 511 VLOG(1) << "Calling session manager's HandleLockScreenDismissed D-Bus method"; |
511 DBusThreadManager::Get()->GetSessionManagerClient()-> | 512 DBusThreadManager::Get()->GetSessionManagerClient()-> |
512 NotifyLockScreenDismissed(); | 513 NotifyLockScreenDismissed(); |
513 | 514 |
514 if (saved_ime_state_.get()) { | 515 if (saved_ime_state_.get()) { |
515 input_method::InputMethodManager::Get()->SetState(saved_ime_state_); | 516 input_method::InputMethodManager::Get()->SetState(saved_ime_state_); |
516 } | 517 } |
518 | |
519 // Screen locker occasionally blocks the virtual keyboard from being shown for | |
520 // the pin keyboard. Make sure this override is turned off when exiting the | |
521 // screen locker. | |
522 keyboard::SetWebUiOverrideEnabled(false); | |
jdufault
2016/10/26 17:56:16
I would move this to ~CoreOobeHandler and ~PeopleH
sammiequon
2016/10/27 00:22:40
Moved to ~CoreOobeHandler. I think ~PeopleHandler
| |
517 } | 523 } |
518 | 524 |
519 void ScreenLocker::SetAuthenticator(Authenticator* authenticator) { | 525 void ScreenLocker::SetAuthenticator(Authenticator* authenticator) { |
520 authenticator_ = authenticator; | 526 authenticator_ = authenticator; |
521 } | 527 } |
522 | 528 |
523 void ScreenLocker::ScreenLockReady() { | 529 void ScreenLocker::ScreenLockReady() { |
524 locked_ = true; | 530 locked_ = true; |
525 base::TimeDelta delta = base::Time::Now() - start_time_; | 531 base::TimeDelta delta = base::Time::Now() - start_time_; |
526 VLOG(1) << "ScreenLocker " << this << " is ready after " | 532 VLOG(1) << "ScreenLocker " << this << " is ready after " |
(...skipping 19 matching lines...) Expand all Loading... | |
546 | 552 |
547 bool ScreenLocker::IsUserLoggedIn(const AccountId& account_id) const { | 553 bool ScreenLocker::IsUserLoggedIn(const AccountId& account_id) const { |
548 for (user_manager::User* user : users_) { | 554 for (user_manager::User* user : users_) { |
549 if (user->GetAccountId() == account_id) | 555 if (user->GetAccountId() == account_id) |
550 return true; | 556 return true; |
551 } | 557 } |
552 return false; | 558 return false; |
553 } | 559 } |
554 | 560 |
555 } // namespace chromeos | 561 } // namespace chromeos |
OLD | NEW |