Revert 231699 "Remove kNaturalScrollDefault."
Many tests started failing at ui::ShouldDefaultToNaturalScroll(), e.g., http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/26125/steps/unit_tests/logs/TestFocusNotification > Remove kNaturalScrollDefault. > > We have a runtime check - IsTouchDevicePresent, so just use that instead of the flag. > > BUG=NONE > TEST=manual > > Review URL: https://codereview.chromium.org/33913003 TBR=achuith@chromium.org Review URL: https://codereview.chromium.org/52223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231779 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -644,8 +644,11 @@ void ChromeBrowserMainPartsChromeos::PreBrowserStart() {
|
||||
// adjusting the oom priority.
|
||||
g_browser_process->platform_part()->oom_priority_manager()->Start();
|
||||
|
||||
if (ui::ShouldDefaultToNaturalScroll())
|
||||
if (ui::ShouldDefaultToNaturalScroll()) {
|
||||
CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
chromeos::switches::kNaturalScrollDefault);
|
||||
ui::SetNaturalScroll(true);
|
||||
}
|
||||
|
||||
ChromeBrowserMainPartsLinux::PreBrowserStart();
|
||||
}
|
||||
|
@ -193,6 +193,7 @@ std::string DeriveCommandLine(const GURL& start_url,
|
||||
chromeos::switches::kHasChromeOSDiamondKey,
|
||||
chromeos::switches::kHasChromeOSKeyboard,
|
||||
chromeos::switches::kLoginProfile,
|
||||
chromeos::switches::kNaturalScrollDefault,
|
||||
::switches::kEnableBrowserTextSubpixelPositioning,
|
||||
::switches::kEnableWebkitTextSubpixelPositioning,
|
||||
views::corewm::switches::kNoDropShadows,
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include "ui/compositor/layer.h"
|
||||
#include "ui/compositor/layer_animation_observer.h"
|
||||
#include "ui/compositor/scoped_layer_animation_settings.h"
|
||||
#include "ui/events/event_utils.h"
|
||||
#include "ui/gfx/rect.h"
|
||||
#include "ui/gfx/transform.h"
|
||||
#include "ui/views/focus/focus_manager.h"
|
||||
@ -920,6 +921,9 @@ void ShowLoginWizard(const std::string& first_screen_name) {
|
||||
prefs->GetBoolean(prefs::kOwnerTapToClickEnabled));
|
||||
}
|
||||
|
||||
ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNaturalScrollDefault));
|
||||
|
||||
gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size()));
|
||||
|
||||
// Check whether we need to execute OOBE process.
|
||||
|
@ -116,7 +116,8 @@ void Preferences::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kNaturalScroll,
|
||||
ui::ShouldDefaultToNaturalScroll(),
|
||||
CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNaturalScrollDefault),
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kPrimaryMouseButtonRight,
|
||||
@ -585,7 +586,8 @@ void Preferences::OnIsSyncingChanged() {
|
||||
|
||||
void Preferences::ForceNaturalScrollDefault() {
|
||||
DVLOG(1) << "ForceNaturalScrollDefault";
|
||||
if (ui::ShouldDefaultToNaturalScroll() &&
|
||||
if (CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNaturalScrollDefault) &&
|
||||
prefs_->IsSyncing() &&
|
||||
!prefs_->GetUserPrefValue(prefs::kNaturalScroll)) {
|
||||
DVLOG(1) << "Natural scroll forced to true";
|
||||
|
@ -41,6 +41,9 @@ class TabScrubberTest : public InProcessBrowserTest,
|
||||
}
|
||||
|
||||
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
|
||||
#if defined(OS_CHROMEOS)
|
||||
command_line->AppendSwitch(chromeos::switches::kNaturalScrollDefault);
|
||||
#endif
|
||||
command_line->AppendSwitch(switches::kOpenAsh);
|
||||
}
|
||||
|
||||
@ -51,8 +54,6 @@ class TabScrubberTest : public InProcessBrowserTest,
|
||||
ash::Shell* shell = ash::Shell::GetInstance();
|
||||
shell->event_transformation_handler()->set_transformation_mode(
|
||||
ash::internal::EventTransformationHandler::TRANSFORM_NONE);
|
||||
|
||||
ui::SetNaturalScroll(true);
|
||||
}
|
||||
|
||||
virtual void CleanUpOnMainThread() OVERRIDE {
|
||||
|
@ -157,6 +157,9 @@ const char kLoginProfile[] = "login-profile";
|
||||
// Specifies the user which is already logged in.
|
||||
const char kLoginUser[] = "login-user";
|
||||
|
||||
// Enables natural scroll by default.
|
||||
const char kNaturalScrollDefault[] = "enable-natural-scroll-default";
|
||||
|
||||
// Skips all other OOBE pages after user login.
|
||||
const char kOobeSkipPostLogin[] = "oobe-skip-postlogin";
|
||||
|
||||
|
@ -62,6 +62,7 @@ CHROMEOS_EXPORT extern const char kLoginManager[];
|
||||
CHROMEOS_EXPORT extern const char kLoginPassword[];
|
||||
CHROMEOS_EXPORT extern const char kLoginProfile[];
|
||||
CHROMEOS_EXPORT extern const char kLoginUser[];
|
||||
CHROMEOS_EXPORT extern const char kNaturalScrollDefault[];
|
||||
CHROMEOS_EXPORT extern const char kOobeSkipPostLogin[];
|
||||
CHROMEOS_EXPORT extern const char kSkipHWIDCheck[];
|
||||
CHROMEOS_EXPORT extern const char kSmsTestMessages[];
|
||||
|
Reference in New Issue
Block a user