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

Side by Side Diff: chrome/browser/ui/gesture_prefs_observer_factory_aura.cc

Issue 18603008: Seperate horizontal and vertical overscrolling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 (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/ui/gesture_prefs_observer_factory_aura.h" 5 #include "chrome/browser/ui/gesture_prefs_observer_factory_aura.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const std::vector<OverscrollPref>& GetOverscrollPrefs() { 48 const std::vector<OverscrollPref>& GetOverscrollPrefs() {
49 CR_DEFINE_STATIC_LOCAL(std::vector<OverscrollPref>, overscroll_prefs, ()); 49 CR_DEFINE_STATIC_LOCAL(std::vector<OverscrollPref>, overscroll_prefs, ());
50 if (overscroll_prefs.empty()) { 50 if (overscroll_prefs.empty()) {
51 using namespace content; 51 using namespace content;
52 const OverscrollPref kOverscrollPrefs[] = { 52 const OverscrollPref kOverscrollPrefs[] = {
53 { prefs::kOverscrollHorizontalThresholdComplete, 53 { prefs::kOverscrollHorizontalThresholdComplete,
54 OVERSCROLL_CONFIG_HORIZ_THRESHOLD_COMPLETE }, 54 OVERSCROLL_CONFIG_HORIZ_THRESHOLD_COMPLETE },
55 { prefs::kOverscrollVerticalThresholdComplete, 55 { prefs::kOverscrollVerticalThresholdComplete,
56 OVERSCROLL_CONFIG_VERT_THRESHOLD_COMPLETE }, 56 OVERSCROLL_CONFIG_VERT_THRESHOLD_COMPLETE },
57 { prefs::kOverscrollMinimumThresholdStart, 57 { prefs::kOverscrollMinimumThresholdStart,
58 OVERSCROLL_CONFIG_MIN_THRESHOLD_START }, 58 OVERSCROLL_CONFIG_HORIZ_THRESHOLD_START },
sadrul 2013/07/04 21:16:35 You need to hook up the vertical threshold into th
rharrison 2013/07/17 18:59:48 Done.
59 { prefs::kOverscrollHorizontalResistThreshold, 59 { prefs::kOverscrollHorizontalResistThreshold,
60 OVERSCROLL_CONFIG_HORIZ_RESIST_AFTER }, 60 OVERSCROLL_CONFIG_HORIZ_RESIST_AFTER },
61 { prefs::kOverscrollVerticalResistThreshold, 61 { prefs::kOverscrollVerticalResistThreshold,
62 OVERSCROLL_CONFIG_VERT_RESIST_AFTER }, 62 OVERSCROLL_CONFIG_VERT_RESIST_AFTER },
63 }; 63 };
64 overscroll_prefs.assign(kOverscrollPrefs, 64 overscroll_prefs.assign(kOverscrollPrefs,
65 kOverscrollPrefs + arraysize(kOverscrollPrefs)); 65 kOverscrollPrefs + arraysize(kOverscrollPrefs));
66 } 66 }
67 return overscroll_prefs; 67 return overscroll_prefs;
68 } 68 }
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 // Use same gesture preferences on incognito windows. 591 // Use same gesture preferences on incognito windows.
592 return chrome::GetBrowserContextRedirectedInIncognito(context); 592 return chrome::GetBrowserContextRedirectedInIncognito(context);
593 } 593 }
594 594
595 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const { 595 bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const {
596 // Some tests replace the PrefService of the TestingProfile after the 596 // Some tests replace the PrefService of the TestingProfile after the
597 // GesturePrefsObserver has been created, which makes Shutdown() 597 // GesturePrefsObserver has been created, which makes Shutdown()
598 // remove the registrar from a non-existent PrefService. 598 // remove the registrar from a non-existent PrefService.
599 return true; 599 return true;
600 } 600 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698