OLD | NEW |
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 | |
22 namespace { | 18 namespace { |
23 // Amount by which to inset the button's content. | 19 // Amount by which to inset the button's content. |
24 const CGFloat kContentInset = 6.0; | 20 const CGFloat kContentInset = 6.0; |
25 | 21 |
26 // Duration of transition animation. | 22 // Duration of transition animation. |
27 const NSTimeInterval kNewTabButtonTransitionDuration = | 23 const NSTimeInterval kNewTabButtonTransitionDuration = |
28 ios::material::kDuration1; | 24 ios::material::kDuration1; |
29 } | 25 } |
30 | 26 |
31 @implementation NewTabButton | 27 @implementation NewTabButton |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 animations:^{ | 76 animations:^{ |
81 self.incognito = incognito; | 77 self.incognito = incognito; |
82 } | 78 } |
83 completion:nil]; | 79 completion:nil]; |
84 } else { | 80 } else { |
85 self.incognito = incognito; | 81 self.incognito = incognito; |
86 } | 82 } |
87 } | 83 } |
88 | 84 |
89 @end | 85 @end |
OLD | NEW |