| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/ui/autofill/storage_switch_tooltip.h" | 5 #import "ios/chrome/browser/ui/autofill/storage_switch_tooltip.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
| 9 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF
ontLoader.h" | 9 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF
ontLoader.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| 11 | 11 |
| 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 13 #error "This file requires ARC support." |
| 14 #endif |
| 15 |
| 12 namespace { | 16 namespace { |
| 13 | 17 |
| 14 const CGFloat kCornerRadius = 2.0f; | 18 const CGFloat kCornerRadius = 2.0f; |
| 15 const CGFloat kFontSize = 12.0f; | 19 const CGFloat kFontSize = 12.0f; |
| 16 const CGFloat kInset = 8.0f; | 20 const CGFloat kInset = 8.0f; |
| 17 | 21 |
| 18 } // namespace | 22 } // namespace |
| 19 | 23 |
| 20 @implementation StorageSwitchTooltip | 24 @implementation StorageSwitchTooltip |
| 21 | 25 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 65 |
| 62 return rect; | 66 return rect; |
| 63 } | 67 } |
| 64 | 68 |
| 65 - (void)drawTextInRect:(CGRect)rect { | 69 - (void)drawTextInRect:(CGRect)rect { |
| 66 UIEdgeInsets insets = {kInset, kInset, kInset, kInset}; | 70 UIEdgeInsets insets = {kInset, kInset, kInset, kInset}; |
| 67 [super drawTextInRect:UIEdgeInsetsInsetRect(rect, insets)]; | 71 [super drawTextInRect:UIEdgeInsetsInsetRect(rect, insets)]; |
| 68 } | 72 } |
| 69 | 73 |
| 70 @end | 74 @end |
| OLD | NEW |