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

Side by Side Diff: ui/base/cocoa/appkit_utils.mm

Issue 2430863002: [Mac] Refactor the fullscreen menubar (Closed)
Patch Set: Fix for rsesek Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "ui/base/cocoa/appkit_utils.h" 5 #import "ui/base/cocoa/appkit_utils.h"
6 6
Robert Sesek 2016/10/19 21:06:52 #include <math>
spqchan 2016/10/19 21:44:16 Done.
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 9
10 namespace { 10 namespace {
11 11
12 // Double-click in window title bar actions. 12 // Double-click in window title bar actions.
13 enum class DoubleClickAction { 13 enum class DoubleClickAction {
14 NONE, 14 NONE,
15 MINIMIZE, 15 MINIMIZE,
16 MAXIMIZE, 16 MAXIMIZE,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 break; 102 break;
103 } 103 }
104 } 104 }
105 105
106 bool ForceClickInvokesQuickLook() { 106 bool ForceClickInvokesQuickLook() {
107 return [[NSUserDefaults standardUserDefaults] 107 return [[NSUserDefaults standardUserDefaults]
108 integerForKey:@"com.apple.trackpad.forceClick"] == 108 integerForKey:@"com.apple.trackpad.forceClick"] ==
109 static_cast<NSInteger>(ForceTouchAction::QUICK_LOOK); 109 static_cast<NSInteger>(ForceTouchAction::QUICK_LOOK);
110 } 110 }
111 111
112 bool IsCGFloatEqual(CGFloat a, CGFloat b) {
113 return std::fabs(a - b) <= std::numeric_limits<CGFloat>::epsilon();
114 }
115
112 } // namespace ui 116 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698