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

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

Issue 301923002: Revert of Follow up change for disabling out-of-box VK overscroll (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 21 matching lines...) Expand all
32 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" 32 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
33 #include "chrome/browser/chromeos/first_run/first_run.h" 33 #include "chrome/browser/chromeos/first_run/first_run.h"
34 #include "chrome/browser/chromeos/input_method/input_method_util.h" 34 #include "chrome/browser/chromeos/input_method/input_method_util.h"
35 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 35 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
36 #include "chrome/browser/chromeos/language_preferences.h" 36 #include "chrome/browser/chromeos/language_preferences.h"
37 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 37 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
38 #include "chrome/browser/chromeos/login/existing_user_controller.h" 38 #include "chrome/browser/chromeos/login/existing_user_controller.h"
39 #include "chrome/browser/chromeos/login/helper.h" 39 #include "chrome/browser/chromeos/login/helper.h"
40 #include "chrome/browser/chromeos/login/login_utils.h" 40 #include "chrome/browser/chromeos/login/login_utils.h"
41 #include "chrome/browser/chromeos/login/login_wizard.h" 41 #include "chrome/browser/chromeos/login/login_wizard.h"
42 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
43 #include "chrome/browser/chromeos/login/startup_utils.h" 42 #include "chrome/browser/chromeos/login/startup_utils.h"
44 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" 43 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
45 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h" 44 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
46 #include "chrome/browser/chromeos/login/ui/oobe_display.h" 45 #include "chrome/browser/chromeos/login/ui/oobe_display.h"
47 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 46 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
48 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 47 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
49 #include "chrome/browser/chromeos/login/users/user_manager.h" 48 #include "chrome/browser/chromeos/login/users/user_manager.h"
50 #include "chrome/browser/chromeos/login/wizard_controller.h" 49 #include "chrome/browser/chromeos/login/wizard_controller.h"
51 #include "chrome/browser/chromeos/mobile_config.h" 50 #include "chrome/browser/chromeos/mobile_config.h"
52 #include "chrome/browser/chromeos/net/delay_network_call.h" 51 #include "chrome/browser/chromeos/net/delay_network_call.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 } 899 }
901 900
902 //////////////////////////////////////////////////////////////////////////////// 901 ////////////////////////////////////////////////////////////////////////////////
903 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: 902 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
904 // implementation: 903 // implementation:
905 904
906 void LoginDisplayHostImpl::OnKeyboardBoundsChanging( 905 void LoginDisplayHostImpl::OnKeyboardBoundsChanging(
907 const gfx::Rect& new_bounds) { 906 const gfx::Rect& new_bounds) {
908 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) { 907 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) {
909 // Keyboard has been hidden. 908 // Keyboard has been hidden.
910 if (GetOobeUI()) { 909 if (webui_login_display_) {
911 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true); 910 webui_login_display_->ShowControlBar(true);
912 if (login::LoginScrollIntoViewEnabled()) 911 if (login::LoginScrollIntoViewEnabled())
913 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(false); 912 webui_login_display_->SetKeyboardState(false);
914 } 913 }
915 } else if (!new_bounds.IsEmpty() && keyboard_bounds_.IsEmpty()) { 914 } else if (!new_bounds.IsEmpty() && keyboard_bounds_.IsEmpty()) {
916 // Keyboard has been shown. 915 // Keyboard has been shown.
917 if (GetOobeUI()) { 916 if (webui_login_display_) {
918 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); 917 webui_login_display_->ShowControlBar(false);
919 if (login::LoginScrollIntoViewEnabled()) 918 if (login::LoginScrollIntoViewEnabled())
920 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true); 919 webui_login_display_->SetKeyboardState(true);
921 } 920 }
922 } 921 }
923 922
924 keyboard_bounds_ = new_bounds; 923 keyboard_bounds_ = new_bounds;
925 } 924 }
926 925
927 //////////////////////////////////////////////////////////////////////////////// 926 ////////////////////////////////////////////////////////////////////////////////
928 // LoginDisplayHostImpl, gfx::DisplayObserver implementation: 927 // LoginDisplayHostImpl, gfx::DisplayObserver implementation:
929 928
930 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) { 929 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) {
931 } 930 }
932 931
933 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) { 932 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) {
934 } 933 }
935 934
936 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display, 935 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display,
937 uint32_t changed_metrics) { 936 uint32_t changed_metrics) {
938 if (display.id() != ash::Shell::GetScreen()->GetPrimaryDisplay().id() || 937 if (display.id() != ash::Shell::GetScreen()->GetPrimaryDisplay().id() ||
939 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { 938 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
940 return; 939 return;
941 } 940 }
942 941
943 if (GetOobeUI()) { 942 if (webui_login_display_) {
944 const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size(); 943 const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size();
945 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 944 webui_login_display_->SetClientAreaSize(size.width(), size.height());
946 size.height());
947 } 945 }
948 } 946 }
949 947
950 //////////////////////////////////////////////////////////////////////////////// 948 ////////////////////////////////////////////////////////////////////////////////
951 // LoginDisplayHostImpl, private 949 // LoginDisplayHostImpl, private
952 950
953 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) { 951 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) {
954 if (shutting_down_) 952 if (shutting_down_)
955 return; 953 return;
956 954
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1300 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1303 new locale_util::SwitchLanguageCallback( 1301 new locale_util::SwitchLanguageCallback(
1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1302 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1305 1303
1306 // Load locale keyboards here. Hardware layout would be automatically enabled. 1304 // Load locale keyboards here. Hardware layout would be automatically enabled.
1307 locale_util::SwitchLanguage( 1305 locale_util::SwitchLanguage(
1308 locale, true, true /* login_layouts_only */, callback.Pass()); 1306 locale, true, true /* login_layouts_only */, callback.Pass());
1309 } 1307 }
1310 1308
1311 } // namespace chromeos 1309 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_display.h ('k') | chrome/browser/chromeos/login/ui/mock_login_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698