diff options
author | Ben Murdoch <benm@google.com> | 2010-08-06 12:13:06 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-08-18 15:49:13 +0100 |
commit | 06741cbc25cd4227a9fba40dfd0273bfcc1a587a (patch) | |
tree | ca6f21dec86a8c4f6d3c50e78628c0cf31da0353 /chrome/common/font_descriptor_mac.h | |
parent | aa0bf16ed53445f227734aee4274c7aef056f032 (diff) | |
download | external_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.zip external_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.tar.gz external_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.tar.bz2 |
Add chrome/common @ 52593
Needed by autofill
Change-Id: Ibfea9ab92382af0bd0cfc6e94d21e4baa4b9d896
Diffstat (limited to 'chrome/common/font_descriptor_mac.h')
-rw-r--r-- | chrome/common/font_descriptor_mac.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/chrome/common/font_descriptor_mac.h b/chrome/common/font_descriptor_mac.h new file mode 100644 index 0000000..25ae9db --- /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_ |