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

Unified Diff: base/mac/mac_util.mm

Issue 2430863002: [Mac] Refactor the fullscreen menubar (Closed)
Patch Set: fix for mark 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 side-by-side diff with in-line comments
Download patch
Index: base/mac/mac_util.mm
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm
index 2f54b2799b5b01932b94fce98a63e5145ebae94b..35fe9d1444f85a487563de553474238ec3ffd93a 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -6,6 +6,8 @@
#import <Cocoa/Cocoa.h>
#import <IOKit/IOKitLib.h>
+
+#include <cmath>
#include <errno.h>
#include <stddef.h>
#include <string.h>
@@ -173,6 +175,10 @@ CGColorSpaceRef GetSystemColorSpace() {
return g_system_color_space;
}
+bool IsCGFloatEqual(CGFloat a, CGFloat b) {
+ return std::fabs(a - b) <= std::numeric_limits<CGFloat>::epsilon();
+}
+
// Add a request for full screen mode. Must be called on the main thread.
void RequestFullScreen(FullScreenMode mode) {
DCHECK_LT(mode, kNumFullScreenModes);

Powered by Google App Engine
This is Rietveld 408576698