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

Unified Diff: ios/chrome/browser/ui/open_in_toolbar.mm

Issue 2804703002: [ObjC ARC] Converts ios/chrome/browser/ui:ui_internal_arc to ARC. (Closed)
Patch Set: comments Created 3 years, 8 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 | « ios/chrome/browser/ui/open_in_controller.mm ('k') | ios/chrome/browser/ui/page_not_available_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/open_in_toolbar.mm
diff --git a/ios/chrome/browser/ui/open_in_toolbar.mm b/ios/chrome/browser/ui/open_in_toolbar.mm
index 827859bd77e043294af551717c21d09c4d8af118..31ef025f2eef8badd80061442c507f8369cbcfad 100644
--- a/ios/chrome/browser/ui/open_in_toolbar.mm
+++ b/ios/chrome/browser/ui/open_in_toolbar.mm
@@ -5,7 +5,6 @@
#import "ios/chrome/browser/ui/open_in_toolbar.h"
#include "base/logging.h"
-#include "base/mac/scoped_nsobject.h"
#import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
#include "ios/chrome/browser/ui/rtl_geometry.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
@@ -13,6 +12,10 @@
#import "ios/third_party/material_components_ios/src/components/Buttons/src/MaterialButtons.h"
#include "ui/base/l10n/l10n_util_mac.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// The toolbar's open button constants.
@@ -32,9 +35,9 @@ const CGFloat kToolbarBackgroundTransparency = 0.97f;
@interface OpenInToolbar () {
// Backing object for |self.openButton|.
- base::scoped_nsobject<MDCButton> _openButton;
+ MDCButton* _openButton;
// Backing object for |self.topBorder|.
- base::scoped_nsobject<UIView> _topBorder;
+ UIView* _topBorder;
}
// The "Open in..." button that's hooked up with the target and action passed
@@ -72,22 +75,22 @@ const CGFloat kToolbarBackgroundTransparency = 0.97f;
- (MDCButton*)openButton {
if (!_openButton) {
- _openButton.reset([[MDCFlatButton alloc] init]);
+ _openButton = [[MDCFlatButton alloc] init];
[_openButton setCustomTitleColor:[[MDCPalette cr_bluePalette] tint500]];
[_openButton setTitle:l10n_util::GetNSStringWithFixup(IDS_IOS_OPEN_IN)
forState:UIControlStateNormal];
[_openButton sizeToFit];
}
- return _openButton.get();
+ return _openButton;
}
- (UIView*)topBorder {
if (!_topBorder) {
- _topBorder.reset([[UIView alloc] initWithFrame:CGRectZero]);
+ _topBorder = [[UIView alloc] initWithFrame:CGRectZero];
[_topBorder setBackgroundColor:UIColorFromRGB(kTopBorderColor,
kTopBorderTransparency)];
}
- return _topBorder.get();
+ return _topBorder;
}
#pragma mark Layout
« no previous file with comments | « ios/chrome/browser/ui/open_in_controller.mm ('k') | ios/chrome/browser/ui/page_not_available_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698