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

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

Issue 298373002: 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"
42 #include "chrome/browser/chromeos/login/startup_utils.h" 43 #include "chrome/browser/chromeos/login/startup_utils.h"
43 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" 44 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
44 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h" 45 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
45 #include "chrome/browser/chromeos/login/ui/oobe_display.h" 46 #include "chrome/browser/chromeos/login/ui/oobe_display.h"
46 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 47 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
47 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 48 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
48 #include "chrome/browser/chromeos/login/users/user_manager.h" 49 #include "chrome/browser/chromeos/login/users/user_manager.h"
49 #include "chrome/browser/chromeos/login/wizard_controller.h" 50 #include "chrome/browser/chromeos/login/wizard_controller.h"
50 #include "chrome/browser/chromeos/mobile_config.h" 51 #include "chrome/browser/chromeos/mobile_config.h"
51 #include "chrome/browser/chromeos/net/delay_network_call.h" 52 #include "chrome/browser/chromeos/net/delay_network_call.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 } 900 }
900 901
901 //////////////////////////////////////////////////////////////////////////////// 902 ////////////////////////////////////////////////////////////////////////////////
902 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: 903 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
903 // implementation: 904 // implementation:
904 905
905 void LoginDisplayHostImpl::OnKeyboardBoundsChanging( 906 void LoginDisplayHostImpl::OnKeyboardBoundsChanging(
906 const gfx::Rect& new_bounds) { 907 const gfx::Rect& new_bounds) {
907 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) { 908 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) {
908 // Keyboard has been hidden. 909 // Keyboard has been hidden.
909 if (webui_login_display_) { 910 if (GetOobeUI()) {
910 webui_login_display_->ShowControlBar(true); 911 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true);
911 if (login::LoginScrollIntoViewEnabled()) 912 if (login::LoginScrollIntoViewEnabled())
912 webui_login_display_->SetKeyboardState(false); 913 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(false);
913 } 914 }
914 } else if (!new_bounds.IsEmpty() && keyboard_bounds_.IsEmpty()) { 915 } else if (!new_bounds.IsEmpty() && keyboard_bounds_.IsEmpty()) {
915 // Keyboard has been shown. 916 // Keyboard has been shown.
916 if (webui_login_display_) { 917 if (GetOobeUI()) {
917 webui_login_display_->ShowControlBar(false); 918 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false);
918 if (login::LoginScrollIntoViewEnabled()) 919 if (login::LoginScrollIntoViewEnabled())
919 webui_login_display_->SetKeyboardState(true); 920 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true);
920 } 921 }
921 } 922 }
922 923
923 keyboard_bounds_ = new_bounds; 924 keyboard_bounds_ = new_bounds;
924 } 925 }
925 926
926 //////////////////////////////////////////////////////////////////////////////// 927 ////////////////////////////////////////////////////////////////////////////////
927 // LoginDisplayHostImpl, gfx::DisplayObserver implementation: 928 // LoginDisplayHostImpl, gfx::DisplayObserver implementation:
928 929
929 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) { 930 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) {
930 } 931 }
931 932
932 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) { 933 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) {
933 } 934 }
934 935
935 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display, 936 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display,
936 uint32_t changed_metrics) { 937 uint32_t changed_metrics) {
937 if (display.id() != ash::Shell::GetScreen()->GetPrimaryDisplay().id() || 938 if (display.id() != ash::Shell::GetScreen()->GetPrimaryDisplay().id() ||
938 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { 939 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
939 return; 940 return;
940 } 941 }
941 942
942 if (webui_login_display_) { 943 if (GetOobeUI()) {
943 const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size(); 944 const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size();
944 webui_login_display_->SetClientAreaSize(size.width(), size.height()); 945 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(),
946 size.height());
945 } 947 }
946 } 948 }
947 949
948 //////////////////////////////////////////////////////////////////////////////// 950 ////////////////////////////////////////////////////////////////////////////////
949 // LoginDisplayHostImpl, private 951 // LoginDisplayHostImpl, private
950 952
951 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) { 953 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) {
952 if (shutting_down_) 954 if (shutting_down_)
953 return; 955 return;
954 956
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1302 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1301 new locale_util::SwitchLanguageCallback( 1303 new locale_util::SwitchLanguageCallback(
1302 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1303 1305
1304 // Load locale keyboards here. Hardware layout would be automatically enabled. 1306 // Load locale keyboards here. Hardware layout would be automatically enabled.
1305 locale_util::SwitchLanguage( 1307 locale_util::SwitchLanguage(
1306 locale, true, true /* login_layouts_only */, callback.Pass()); 1308 locale, true, true /* login_layouts_only */, callback.Pass());
1307 } 1309 }
1308 1310
1309 } // namespace chromeos 1311 } // 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