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

Side by Side Diff: ios/chrome/browser/ui/toolbar/new_tab_button.mm

Issue 2808873002: [ObjC ARC] Converts ios/chrome/browser/ui/toolbar:toolbar to ARC. (Closed)
Patch Set: feedback 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/toolbar/new_tab_button.h" 5 #import "ios/chrome/browser/ui/toolbar/new_tab_button.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" 8 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
9 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" 9 #include "ios/chrome/browser/ui/commands/ios_command_ids.h"
10 #import "ios/chrome/browser/ui/image_util.h" 10 #import "ios/chrome/browser/ui/image_util.h"
11 #import "ios/chrome/browser/ui/rtl_geometry.h" 11 #import "ios/chrome/browser/ui/rtl_geometry.h"
12 #import "ios/chrome/browser/ui/uikit_ui_util.h" 12 #import "ios/chrome/browser/ui/uikit_ui_util.h"
13 #import "ios/chrome/common/material_timing.h" 13 #import "ios/chrome/common/material_timing.h"
14 #include "ios/chrome/grit/ios_strings.h" 14 #include "ios/chrome/grit/ios_strings.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/base/l10n/l10n_util_mac.h" 16 #include "ui/base/l10n/l10n_util_mac.h"
17 17
18 #if !defined(__has_feature) || !__has_feature(objc_arc)
19 #error "This file requires ARC support."
20 #endif
21
18 namespace { 22 namespace {
19 // Amount by which to inset the button's content. 23 // Amount by which to inset the button's content.
20 const CGFloat kContentInset = 6.0; 24 const CGFloat kContentInset = 6.0;
21 25
22 // Duration of transition animation. 26 // Duration of transition animation.
23 const NSTimeInterval kNewTabButtonTransitionDuration = 27 const NSTimeInterval kNewTabButtonTransitionDuration =
24 ios::material::kDuration1; 28 ios::material::kDuration1;
25 } 29 }
26 30
27 @implementation NewTabButton 31 @implementation NewTabButton
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 animations:^{ 80 animations:^{
77 self.incognito = incognito; 81 self.incognito = incognito;
78 } 82 }
79 completion:nil]; 83 completion:nil];
80 } else { 84 } else {
81 self.incognito = incognito; 85 self.incognito = incognito;
82 } 86 }
83 } 87 }
84 88
85 @end 89 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698