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

Side by Side Diff: base/mac/scoped_smooth_scrolling_disabler_mac.mm

Issue 7693019: Enable smooth scrolling on mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ppapi test Created 9 years, 3 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/mac/scoped_smooth_scrolling_disabler_mac.h"
6
7 #include <Cocoa/Cocoa.h>
8
9 namespace base {
10
11 ScopedSmoothScrollingDisabler::ScopedSmoothScrollingDisabler(
12 bool actually_disable) {
13 if (actually_disable) {
14 // With smooth scrolling, cmd-down et al send many small scroll events on a
15 // timer, which is problematic for some tests.
16 [[NSUserDefaults standardUserDefaults]
17 setBool:NO forKey:@"AppleScrollAnimationEnabled"];
Mark Mentovai 2011/08/31 02:59:57 These suck because they leave bad prefs on the dis
Nico 2011/08/31 03:30:51 I couldn't think of one; this is how Apple's DRT d
Mark Mentovai 2011/08/31 03:39:01 My concern is actually the confluence of (a) and (
18 }
19 }
20
21 ScopedSmoothScrollingDisabler::~ScopedSmoothScrollingDisabler() {
22 [[NSUserDefaults standardUserDefaults]
23 removeObjectForKey:@"AppleScrollAnimationEnabled"];
24 }
25
26 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698