| OLD | NEW |
| 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 |
| 7 #include <cmath> |
| 8 |
| 7 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 8 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| 9 | 11 |
| 10 namespace { | 12 namespace { |
| 11 | 13 |
| 12 // Double-click in window title bar actions. | 14 // Double-click in window title bar actions. |
| 13 enum class DoubleClickAction { | 15 enum class DoubleClickAction { |
| 14 NONE, | 16 NONE, |
| 15 MINIMIZE, | 17 MINIMIZE, |
| 16 MAXIMIZE, | 18 MAXIMIZE, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 break; | 104 break; |
| 103 } | 105 } |
| 104 } | 106 } |
| 105 | 107 |
| 106 bool ForceClickInvokesQuickLook() { | 108 bool ForceClickInvokesQuickLook() { |
| 107 return [[NSUserDefaults standardUserDefaults] | 109 return [[NSUserDefaults standardUserDefaults] |
| 108 integerForKey:@"com.apple.trackpad.forceClick"] == | 110 integerForKey:@"com.apple.trackpad.forceClick"] == |
| 109 static_cast<NSInteger>(ForceTouchAction::QUICK_LOOK); | 111 static_cast<NSInteger>(ForceTouchAction::QUICK_LOOK); |
| 110 } | 112 } |
| 111 | 113 |
| 114 bool IsCGFloatEqual(CGFloat a, CGFloat b) { |
| 115 return std::fabs(a - b) <= std::numeric_limits<CGFloat>::epsilon(); |
| 116 } |
| 117 |
| 112 } // namespace ui | 118 } // namespace ui |
| OLD | NEW |