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

Side by Side Diff: chrome/browser/platform_util_mac.mm

Issue 10092017: Mac: Prevent NTP mousewheel events from being suppressed on Lion. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix grammar & style. Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <CoreServices/CoreServices.h> 9 #include <CoreServices/CoreServices.h>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 bool IsVisible(gfx::NativeView view) { 149 bool IsVisible(gfx::NativeView view) {
150 // A reasonable approximation of how you'd expect this to behave. 150 // A reasonable approximation of how you'd expect this to behave.
151 return (view && 151 return (view &&
152 ![view isHiddenOrHasHiddenAncestor] && 152 ![view isHiddenOrHasHiddenAncestor] &&
153 [view window] && 153 [view window] &&
154 [[view window] isVisible]); 154 [[view window] isVisible]);
155 } 155 }
156 156
157 bool IsSwipeTrackingFromScrollEventsEnabled() {
158 SEL selector = @selector(isSwipeTrackingFromScrollEventsEnabled);
159 return [NSEvent respondsToSelector:selector]
160 && [NSEvent performSelector:selector];
161 }
162
157 } // namespace platform_util 163 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/browser/platform_util.h ('k') | chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698