| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/infobars/infobar_view.h" | 5 #import "ios/chrome/browser/ui/infobars/infobar_view.h" |
| 6 | 6 |
| 7 #import <CoreGraphics/CoreGraphics.h> | 7 #import <CoreGraphics/CoreGraphics.h> |
| 8 #import <QuartzCore/QuartzCore.h> | 8 #import <QuartzCore/QuartzCore.h> |
| 9 | 9 |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // button1_ is tagged with ConfirmInfoBarDelegate::BUTTON_OK . | 251 // button1_ is tagged with ConfirmInfoBarDelegate::BUTTON_OK . |
| 252 // button2_ is tagged with ConfirmInfoBarDelegate::BUTTON_CANCEL . | 252 // button2_ is tagged with ConfirmInfoBarDelegate::BUTTON_CANCEL . |
| 253 base::scoped_nsobject<UIButton> button1_; | 253 base::scoped_nsobject<UIButton> button1_; |
| 254 base::scoped_nsobject<UIButton> button2_; | 254 base::scoped_nsobject<UIButton> button2_; |
| 255 // Drop shadow. | 255 // Drop shadow. |
| 256 base::scoped_nsobject<UIImageView> shadow_; | 256 base::scoped_nsobject<UIImageView> shadow_; |
| 257 } | 257 } |
| 258 | 258 |
| 259 @synthesize visibleHeight = visibleHeight_; | 259 @synthesize visibleHeight = visibleHeight_; |
| 260 | 260 |
| 261 - (id)initWithFrame:(CGRect)frame delegate:(InfoBarViewDelegate*)delegate { | 261 - (instancetype)initWithFrame:(CGRect)frame |
| 262 delegate:(InfoBarViewDelegate*)delegate { |
| 262 self = [super initWithFrame:frame]; | 263 self = [super initWithFrame:frame]; |
| 263 if (self) { | 264 if (self) { |
| 264 delegate_ = delegate; | 265 delegate_ = delegate; |
| 265 // Make the drop shadow. | 266 // Make the drop shadow. |
| 266 UIImage* shadowImage = [UIImage imageNamed:@"infobar_shadow"]; | 267 UIImage* shadowImage = [UIImage imageNamed:@"infobar_shadow"]; |
| 267 shadow_.reset([[UIImageView alloc] initWithImage:shadowImage]); | 268 shadow_.reset([[UIImageView alloc] initWithImage:shadowImage]); |
| 268 [self addSubview:shadow_]; | 269 [self addSubview:shadow_]; |
| 269 [self setAutoresizingMask:UIViewAutoresizingFlexibleWidth | | 270 [self setAutoresizingMask:UIViewAutoresizingFlexibleWidth | |
| 270 UIViewAutoresizingFlexibleHeight]; | 271 UIViewAutoresizingFlexibleHeight]; |
| 271 [self setAccessibilityViewIsModal:YES]; | 272 [self setAccessibilityViewIsModal:YES]; |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 | 943 |
| 943 - (CGFloat)buttonMargin { | 944 - (CGFloat)buttonMargin { |
| 944 return kButtonMargin; | 945 return kButtonMargin; |
| 945 } | 946 } |
| 946 | 947 |
| 947 - (const std::vector<std::pair<NSUInteger, NSRange>>&)linkRanges { | 948 - (const std::vector<std::pair<NSUInteger, NSRange>>&)linkRanges { |
| 948 return linkRanges_; | 949 return linkRanges_; |
| 949 } | 950 } |
| 950 | 951 |
| 951 @end | 952 @end |
| OLD | NEW |