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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 42863003: cros: Default to natural scrolling if the internal diplay is a touchscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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
« no previous file with comments | « ash/display/display_manager.cc ('k') | ui/events/event_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 #endif 637 #endif
638 638
639 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 639 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
640 // -- immediately after ChildProcess::WaitForDebugger(). 640 // -- immediately after ChildProcess::WaitForDebugger().
641 641
642 // Start the out-of-memory priority manager here so that we give the most 642 // Start the out-of-memory priority manager here so that we give the most
643 // amount of time for the other services to start up before we start 643 // amount of time for the other services to start up before we start
644 // adjusting the oom priority. 644 // adjusting the oom priority.
645 g_browser_process->platform_part()->oom_priority_manager()->Start(); 645 g_browser_process->platform_part()->oom_priority_manager()->Start();
646 646
647 // Turn on natural scroll if we have a touch screen. 647 if (ui::ShouldDefaultToNaturalScroll()) {
648 if (ui::IsTouchDevicePresent()) {
649 CommandLine::ForCurrentProcess()->AppendSwitch( 648 CommandLine::ForCurrentProcess()->AppendSwitch(
650 chromeos::switches::kNaturalScrollDefault); 649 chromeos::switches::kNaturalScrollDefault);
651 ui::SetNaturalScroll(true); 650 ui::SetNaturalScroll(true);
652 } 651 }
653 652
654 ChromeBrowserMainPartsLinux::PreBrowserStart(); 653 ChromeBrowserMainPartsLinux::PreBrowserStart();
655 } 654 }
656 655
657 void ChromeBrowserMainPartsChromeos::PostBrowserStart() { 656 void ChromeBrowserMainPartsChromeos::PostBrowserStart() {
658 // These are dependent on the ash::Shell singleton already having been 657 // These are dependent on the ash::Shell singleton already having been
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 765
767 // Destroy DeviceSettingsService after g_browser_process. 766 // Destroy DeviceSettingsService after g_browser_process.
768 DeviceSettingsService::Shutdown(); 767 DeviceSettingsService::Shutdown();
769 } 768 }
770 769
771 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { 770 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() {
772 default_pinned_apps_field_trial::SetupTrial(); 771 default_pinned_apps_field_trial::SetupTrial();
773 } 772 }
774 773
775 } // namespace chromeos 774 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/display/display_manager.cc ('k') | ui/events/event_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698