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

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

Issue 52223002: Revert 231699 "Remove kNaturalScrollDefault." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 (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/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_controller.h" 9 #include "ash/desktop_background/desktop_background_controller.h"
10 #include "ash/desktop_background/user_wallpaper_delegate.h" 10 #include "ash/desktop_background/user_wallpaper_delegate.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "content/public/browser/notification_service.h" 59 #include "content/public/browser/notification_service.h"
60 #include "content/public/browser/notification_types.h" 60 #include "content/public/browser/notification_types.h"
61 #include "content/public/browser/web_contents.h" 61 #include "content/public/browser/web_contents.h"
62 #include "content/public/browser/web_contents_view.h" 62 #include "content/public/browser/web_contents_view.h"
63 #include "content/public/browser/web_ui.h" 63 #include "content/public/browser/web_ui.h"
64 #include "ui/aura/window.h" 64 #include "ui/aura/window.h"
65 #include "ui/base/resource/resource_bundle.h" 65 #include "ui/base/resource/resource_bundle.h"
66 #include "ui/compositor/layer.h" 66 #include "ui/compositor/layer.h"
67 #include "ui/compositor/layer_animation_observer.h" 67 #include "ui/compositor/layer_animation_observer.h"
68 #include "ui/compositor/scoped_layer_animation_settings.h" 68 #include "ui/compositor/scoped_layer_animation_settings.h"
69 #include "ui/events/event_utils.h"
69 #include "ui/gfx/rect.h" 70 #include "ui/gfx/rect.h"
70 #include "ui/gfx/transform.h" 71 #include "ui/gfx/transform.h"
71 #include "ui/views/focus/focus_manager.h" 72 #include "ui/views/focus/focus_manager.h"
72 #include "ui/views/widget/widget.h" 73 #include "ui/views/widget/widget.h"
73 #include "url/gurl.h" 74 #include "url/gurl.h"
74 75
75 namespace { 76 namespace {
76 77
77 // URL which corresponds to the login WebUI. 78 // URL which corresponds to the login WebUI.
78 const char kLoginURL[] = "chrome://oobe/login"; 79 const char kLoginURL[] = "chrome://oobe/login";
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 914
914 PrefService* prefs = g_browser_process->local_state(); 915 PrefService* prefs = g_browser_process->local_state();
915 // Apply owner preferences for tap-to-click and mouse buttons swap for 916 // Apply owner preferences for tap-to-click and mouse buttons swap for
916 // login screen. 917 // login screen.
917 system::mouse_settings::SetPrimaryButtonRight( 918 system::mouse_settings::SetPrimaryButtonRight(
918 prefs->GetBoolean(prefs::kOwnerPrimaryMouseButtonRight)); 919 prefs->GetBoolean(prefs::kOwnerPrimaryMouseButtonRight));
919 system::touchpad_settings::SetTapToClick( 920 system::touchpad_settings::SetTapToClick(
920 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); 921 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled));
921 } 922 }
922 923
924 ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch(
925 switches::kNaturalScrollDefault));
926
923 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); 927 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size()));
924 928
925 // Check whether we need to execute OOBE process. 929 // Check whether we need to execute OOBE process.
926 bool oobe_complete = chromeos::StartupUtils::IsOobeCompleted(); 930 bool oobe_complete = chromeos::StartupUtils::IsOobeCompleted();
927 if (!oobe_complete) { 931 if (!oobe_complete) {
928 LoginState::Get()->SetLoggedInState( 932 LoginState::Get()->SetLoggedInState(
929 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE); 933 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE);
930 } else { 934 } else {
931 LoginState::Get()->SetLoggedInState( 935 LoginState::Get()->SetLoggedInState(
932 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE); 936 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 VLOG(1) << "Initial time zone: " << timezone_name; 1033 VLOG(1) << "Initial time zone: " << timezone_name;
1030 // Apply locale customizations only once to preserve whatever locale 1034 // Apply locale customizations only once to preserve whatever locale
1031 // user has changed to during OOBE. 1035 // user has changed to during OOBE.
1032 if (!timezone_name.empty()) { 1036 if (!timezone_name.empty()) {
1033 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( 1037 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID(
1034 UTF8ToUTF16(timezone_name)); 1038 UTF8ToUTF16(timezone_name));
1035 } 1039 }
1036 } 1040 }
1037 1041
1038 } // namespace chromeos 1042 } // namespace chromeos
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | trunk/src/chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698