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

Side by Side Diff: ui/gfx/android/view_configuration.cc

Issue 2056563002: Roll base to 0032c8e1a72eb85d947d8df8de503caa62b4d0a8. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « ui/gfx/android/shared_device_display_info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/gfx/android/view_configuration.h" 5 #include "ui/gfx/android/view_configuration.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "jni/ViewConfigurationHelper_jni.h" 10 #include "jni/ViewConfigurationHelper_jni.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 DISALLOW_COPY_AND_ASSIGN(ViewConfigurationData); 141 DISALLOW_COPY_AND_ASSIGN(ViewConfigurationData);
142 }; 142 };
143 143
144 // Leaky to allow access from any thread. 144 // Leaky to allow access from any thread.
145 base::LazyInstance<ViewConfigurationData>::Leaky g_view_configuration = 145 base::LazyInstance<ViewConfigurationData>::Leaky g_view_configuration =
146 LAZY_INSTANCE_INITIALIZER; 146 LAZY_INSTANCE_INITIALIZER;
147 147
148 } // namespace 148 } // namespace
149 149
150 static void UpdateSharedViewConfiguration(JNIEnv* env, 150 static void UpdateSharedViewConfiguration(JNIEnv* env,
151 jobject obj, 151 const JavaParamRef<jobject>& obj,
152 jint scaled_maximum_fling_velocity, 152 jint scaled_maximum_fling_velocity,
153 jint scaled_minimum_fling_velocity, 153 jint scaled_minimum_fling_velocity,
154 jint scaled_touch_slop, 154 jint scaled_touch_slop,
155 jint scaled_double_tap_slop, 155 jint scaled_double_tap_slop,
156 jint scaled_min_scaling_span, 156 jint scaled_min_scaling_span,
157 jint scaled_min_scaling_touch_major) { 157 jint scaled_min_scaling_touch_major) {
158 g_view_configuration.Get().SynchronizedUpdate(scaled_maximum_fling_velocity, 158 g_view_configuration.Get().SynchronizedUpdate(scaled_maximum_fling_velocity,
159 scaled_minimum_fling_velocity, 159 scaled_minimum_fling_velocity,
160 scaled_touch_slop, 160 scaled_touch_slop,
161 scaled_double_tap_slop, 161 scaled_double_tap_slop,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 int ViewConfiguration::GetMinScalingTouchMajorInPixels() { 202 int ViewConfiguration::GetMinScalingTouchMajorInPixels() {
203 return g_view_configuration.Get().min_scaling_touch_major_in_pixels(); 203 return g_view_configuration.Get().min_scaling_touch_major_in_pixels();
204 } 204 }
205 205
206 bool ViewConfiguration::RegisterViewConfiguration(JNIEnv* env) { 206 bool ViewConfiguration::RegisterViewConfiguration(JNIEnv* env) {
207 return RegisterNativesImpl(env); 207 return RegisterNativesImpl(env);
208 } 208 }
209 209
210 } // namespace gfx 210 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/android/shared_device_display_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698