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

Unified Diff: chrome/common/font_descriptor_mac.h

Issue 2804001: Mac: More pluming for OOP font loading (Closed)
Patch Set: Fix review comments Created 10 years, 6 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: chrome/common/font_descriptor_mac.h
diff --git a/chrome/common/font_descriptor_mac.h b/chrome/common/font_descriptor_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..25ae9dba8202de34f436c66a2896eeaeb9d16b20
--- /dev/null
+++ b/chrome/common/font_descriptor_mac.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_FONT_DESCRIPTOR_MAC_H_
+#define CHROME_COMMON_FONT_DESCRIPTOR_MAC_H_
+
+#include "base/string16.h"
+
+#ifdef __OBJC__
+@class NSFont;
+#else
+class NSFont;
+#endif
+
+// Container to allow serializing an NSFont over IPC.
+struct FontDescriptor {
+ explicit FontDescriptor(NSFont* font);
+
+ FontDescriptor() : font_point_size(0) {}
+
+ // Return an autoreleased NSFont corresponding to the font description.
+ NSFont* nsFont() const;
+
+ // Name of the font.
+ string16 font_name;
+
+ // Size in points.
+ float font_point_size;
+};
+
+#endif // CHROME_COMMON_FONT_DESCRIPTOR_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698