OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "chrome/browser/prefs/pref_service.h" | 37 #include "chrome/browser/prefs/pref_service.h" |
38 #include "chrome/common/chrome_notification_types.h" | 38 #include "chrome/common/chrome_notification_types.h" |
39 #include "chrome/common/chrome_switches.h" | 39 #include "chrome/common/chrome_switches.h" |
40 #include "chrome/common/pref_names.h" | 40 #include "chrome/common/pref_names.h" |
41 #include "chromeos/dbus/dbus_thread_manager.h" | 41 #include "chromeos/dbus/dbus_thread_manager.h" |
42 #include "chromeos/dbus/session_manager_client.h" | 42 #include "chromeos/dbus/session_manager_client.h" |
43 #include "content/public/browser/notification_service.h" | 43 #include "content/public/browser/notification_service.h" |
44 #include "content/public/browser/notification_types.h" | 44 #include "content/public/browser/notification_types.h" |
45 #include "googleurl/src/gurl.h" | 45 #include "googleurl/src/gurl.h" |
46 #include "ui/aura/window.h" | 46 #include "ui/aura/window.h" |
| 47 #include "ui/base/events/event_utils.h" |
47 #include "ui/base/resource/resource_bundle.h" | 48 #include "ui/base/resource/resource_bundle.h" |
48 #include "ui/compositor/layer.h" | 49 #include "ui/compositor/layer.h" |
49 #include "ui/compositor/layer_animation_element.h" | 50 #include "ui/compositor/layer_animation_element.h" |
50 #include "ui/compositor/layer_animation_sequence.h" | 51 #include "ui/compositor/layer_animation_sequence.h" |
51 #include "ui/compositor/layer_animator.h" | 52 #include "ui/compositor/layer_animator.h" |
52 #include "ui/compositor/scoped_layer_animation_settings.h" | 53 #include "ui/compositor/scoped_layer_animation_settings.h" |
53 #include "ui/gfx/rect.h" | 54 #include "ui/gfx/rect.h" |
54 #include "ui/gfx/transform.h" | 55 #include "ui/gfx/transform.h" |
55 #include "ui/views/widget/widget.h" | 56 #include "ui/views/widget/widget.h" |
56 | 57 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 manager->EnableLayouts(locale, initial_input_method_id); | 396 manager->EnableLayouts(locale, initial_input_method_id); |
396 | 397 |
397 // Apply owner preferences for tap-to-click and mouse buttons swap for | 398 // Apply owner preferences for tap-to-click and mouse buttons swap for |
398 // login screen. | 399 // login screen. |
399 system::mouse_settings::SetPrimaryButtonRight( | 400 system::mouse_settings::SetPrimaryButtonRight( |
400 prefs->GetBoolean(prefs::kOwnerPrimaryMouseButtonRight)); | 401 prefs->GetBoolean(prefs::kOwnerPrimaryMouseButtonRight)); |
401 system::touchpad_settings::SetTapToClick( | 402 system::touchpad_settings::SetTapToClick( |
402 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); | 403 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); |
403 } | 404 } |
404 | 405 |
| 406 ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch( |
| 407 switches::kNaturalScrollDefault)); |
| 408 |
405 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(size)); | 409 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(size)); |
406 | 410 |
407 // Check whether we need to execute OOBE process. | 411 // Check whether we need to execute OOBE process. |
408 bool oobe_complete = chromeos::WizardController::IsOobeCompleted(); | 412 bool oobe_complete = chromeos::WizardController::IsOobeCompleted(); |
409 bool show_login_screen = | 413 bool show_login_screen = |
410 (first_screen_name.empty() && oobe_complete) || | 414 (first_screen_name.empty() && oobe_complete) || |
411 first_screen_name == chromeos::WizardController::kLoginScreenName; | 415 first_screen_name == chromeos::WizardController::kLoginScreenName; |
412 | 416 |
413 chromeos::LoginDisplayHost* display_host; | 417 chromeos::LoginDisplayHost* display_host; |
414 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds); | 418 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 VLOG(1) << "Initial time zone: " << timezone_name; | 494 VLOG(1) << "Initial time zone: " << timezone_name; |
491 // Apply locale customizations only once to preserve whatever locale | 495 // Apply locale customizations only once to preserve whatever locale |
492 // user has changed to during OOBE. | 496 // user has changed to during OOBE. |
493 if (!timezone_name.empty()) { | 497 if (!timezone_name.empty()) { |
494 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 498 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
495 UTF8ToUTF16(timezone_name)); | 499 UTF8ToUTF16(timezone_name)); |
496 } | 500 } |
497 } | 501 } |
498 | 502 |
499 } // namespace chromeos | 503 } // namespace chromeos |
OLD | NEW |