Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 304153004: Center lock screen user pod when virtual keyboard is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h" 9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: 903 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
904 // implementation: 904 // implementation:
905 905
906 void LoginDisplayHostImpl::OnKeyboardBoundsChanging( 906 void LoginDisplayHostImpl::OnKeyboardBoundsChanging(
907 const gfx::Rect& new_bounds) { 907 const gfx::Rect& new_bounds) {
908 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) { 908 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) {
909 // Keyboard has been hidden. 909 // Keyboard has been hidden.
910 if (GetOobeUI()) { 910 if (GetOobeUI()) {
911 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true); 911 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true);
912 if (login::LoginScrollIntoViewEnabled()) 912 if (login::LoginScrollIntoViewEnabled())
913 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(false); 913 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(false, new_bounds);
914 } 914 }
915 } else if (!new_bounds.IsEmpty() && keyboard_bounds_.IsEmpty()) { 915 } else if (!new_bounds.IsEmpty() && keyboard_bounds_.IsEmpty()) {
916 // Keyboard has been shown. 916 // Keyboard has been shown.
917 if (GetOobeUI()) { 917 if (GetOobeUI()) {
918 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); 918 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false);
919 if (login::LoginScrollIntoViewEnabled()) 919 if (login::LoginScrollIntoViewEnabled())
920 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true); 920 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true, new_bounds);
921 } 921 }
922 } 922 }
923 923
924 keyboard_bounds_ = new_bounds; 924 keyboard_bounds_ = new_bounds;
925 } 925 }
926 926
927 //////////////////////////////////////////////////////////////////////////////// 927 ////////////////////////////////////////////////////////////////////////////////
928 // LoginDisplayHostImpl, gfx::DisplayObserver implementation: 928 // LoginDisplayHostImpl, gfx::DisplayObserver implementation:
929 929
930 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) { 930 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) {
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1302 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1303 new locale_util::SwitchLanguageCallback( 1303 new locale_util::SwitchLanguageCallback(
1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1305 1305
1306 // Load locale keyboards here. Hardware layout would be automatically enabled. 1306 // Load locale keyboards here. Hardware layout would be automatically enabled.
1307 locale_util::SwitchLanguage( 1307 locale_util::SwitchLanguage(
1308 locale, true, true /* login_layouts_only */, callback.Pass()); 1308 locale, true, true /* login_layouts_only */, callback.Pass());
1309 } 1309 }
1310 1310
1311 } // namespace chromeos 1311 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/core_oobe_actor.h ('k') | chrome/browser/resources/chromeos/login/login_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698