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

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

Issue 2430863002: [Mac] Refactor the fullscreen menubar (Closed)
Patch Set: Fix for rsesek 2 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
« no previous file with comments | « ui/base/cocoa/appkit_utils.h ('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 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
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
OLDNEW
« no previous file with comments | « ui/base/cocoa/appkit_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698