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

Unified Diff: chrome/browser/ui/gesture_prefs_observer_factory_aura.cc

Issue 613373004: Adopt ui::GestureConfiguration on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyright Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/ash/tab_scrubber.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
index d5f3d238212757375627778cd87eed89632b34e2..0123baf8a347c1e871ba694a987a02aab650f8bc 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
@@ -22,7 +22,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/overscroll_configuration.h"
#include "content/public/common/renderer_preferences.h"
-#include "ui/events/gestures/gesture_configuration.h"
+#include "ui/events/gesture_detection/gesture_configuration.h"
using ui::GestureConfiguration;
@@ -145,15 +145,16 @@ void GesturePrefsObserver::Shutdown() {
}
void GesturePrefsObserver::Update() {
- GestureConfiguration::set_fling_max_cancel_to_down_time_in_ms(
+ GestureConfiguration* gesture_config = GestureConfiguration::GetInstance();
+ gesture_config->set_fling_max_cancel_to_down_time_in_ms(
prefs_->GetInteger(prefs::kFlingMaxCancelToDownTimeInMs));
- GestureConfiguration::set_fling_max_tap_gap_time_in_ms(
+ gesture_config->set_fling_max_tap_gap_time_in_ms(
prefs_->GetInteger(prefs::kFlingMaxTapGapTimeInMs));
- GestureConfiguration::set_tab_scrub_activation_delay_in_ms(
+ gesture_config->set_tab_scrub_activation_delay_in_ms(
prefs_->GetInteger(prefs::kTabScrubActivationDelayInMs));
- GestureConfiguration::set_semi_long_press_time_in_ms(
+ gesture_config->set_semi_long_press_time_in_ms(
prefs_->GetInteger(prefs::kSemiLongPressTimeInMs));
- GestureConfiguration::set_max_separation_for_gesture_touches_in_pixels(
+ gesture_config->set_max_separation_for_gesture_touches_in_pixels(
static_cast<float>(
prefs_->GetDouble(prefs::kMaxSeparationForGestureTouchesInPixels)));
@@ -211,25 +212,26 @@ void GesturePrefsObserverFactoryAura::RegisterOverscrollPrefs(
void GesturePrefsObserverFactoryAura::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
+ GestureConfiguration* gesture_config = GestureConfiguration::GetInstance();
registry->RegisterIntegerPref(
prefs::kFlingMaxCancelToDownTimeInMs,
- GestureConfiguration::fling_max_cancel_to_down_time_in_ms(),
+ gesture_config->fling_max_cancel_to_down_time_in_ms(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterIntegerPref(
prefs::kFlingMaxTapGapTimeInMs,
- GestureConfiguration::fling_max_tap_gap_time_in_ms(),
+ gesture_config->fling_max_tap_gap_time_in_ms(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterIntegerPref(
prefs::kTabScrubActivationDelayInMs,
- GestureConfiguration::tab_scrub_activation_delay_in_ms(),
+ gesture_config->tab_scrub_activation_delay_in_ms(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterIntegerPref(
prefs::kSemiLongPressTimeInMs,
- GestureConfiguration::semi_long_press_time_in_ms(),
+ gesture_config->semi_long_press_time_in_ms(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterDoublePref(
prefs::kMaxSeparationForGestureTouchesInPixels,
- GestureConfiguration::max_separation_for_gesture_touches_in_pixels(),
+ gesture_config->max_separation_for_gesture_touches_in_pixels(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
RegisterOverscrollPrefs(registry);
}
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/ash/tab_scrubber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698