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

Unified Diff: ui/ios/NSString+CrStringDrawing.mm

Issue 983413004: Eliminate ui/ios (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « ui/ios/NSString+CrStringDrawing.h ('k') | ui/ios/NSString+CrStringDrawing_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ios/NSString+CrStringDrawing.mm
diff --git a/ui/ios/NSString+CrStringDrawing.mm b/ui/ios/NSString+CrStringDrawing.mm
deleted file mode 100644
index e9274e9849979fabb6b81e422603e5ebc6b80d83..0000000000000000000000000000000000000000
--- a/ui/ios/NSString+CrStringDrawing.mm
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 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.
-
-#import "ui/ios/NSString+CrStringDrawing.h"
-
-#include "base/logging.h"
-#include "ui/ios/uikit_util.h"
-
-@implementation NSString (CrStringDrawing)
-
-- (CGRect)cr_boundingRectWithSize:(CGSize)size
- font:(UIFont*)font {
- NSDictionary* attributes = font ? @{NSFontAttributeName: font} : @{};
- return [self boundingRectWithSize:size
- options:NSStringDrawingUsesLineFragmentOrigin
- attributes:attributes
- context:nil];
-}
-
-- (CGSize)cr_boundingSizeWithSize:(CGSize)size
- font:(UIFont*)font {
- return [self cr_boundingRectWithSize:size font:font].size;
-}
-
-- (CGSize)cr_pixelAlignedSizeWithFont:(UIFont*)font {
- DCHECK(font) << "|font| can not be nil; it is used as a NSDictionary value";
- NSDictionary* attributes = @{ NSFontAttributeName : font };
- return ui::AlignSizeToUpperPixel([self sizeWithAttributes:attributes]);
-}
-
-- (CGSize)cr_sizeWithFont:(UIFont*)font {
- if (!font)
- return CGSizeZero;
- NSDictionary* attributes = @{ NSFontAttributeName : font };
- CGSize size = [self sizeWithAttributes:attributes];
- return CGSizeMake(ceil(size.width), ceil(size.height));
-}
-
-@end
« no previous file with comments | « ui/ios/NSString+CrStringDrawing.h ('k') | ui/ios/NSString+CrStringDrawing_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698