| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/omnibox/omnibox_popup_material_row.h" | 5 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/objc_property_releaser.h" | 8 #include "base/mac/objc_property_releaser.h" |
| 9 #import "ios/chrome/browser/ui/omnibox/truncating_attributed_label.h" | 9 #import "ios/chrome/browser/ui/omnibox/truncating_attributed_label.h" |
| 10 #include "ios/chrome/browser/ui/rtl_geometry.h" | 10 #include "ios/chrome/browser/ui/rtl_geometry.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 - (void)updateAppendButtonImages { | 156 - (void)updateAppendButtonImages { |
| 157 int appendResourceID = _incognito | 157 int appendResourceID = _incognito |
| 158 ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO | 158 ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO |
| 159 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND; | 159 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND; |
| 160 UIImage* appendImage = NativeReversableImage(appendResourceID, YES); | 160 UIImage* appendImage = NativeReversableImage(appendResourceID, YES); |
| 161 | 161 |
| 162 [_appendButton setImage:appendImage forState:UIControlStateNormal]; | 162 [_appendButton setImage:appendImage forState:UIControlStateNormal]; |
| 163 int appendSelectedResourceID = | 163 int appendSelectedResourceID = |
| 164 _incognito ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO_HIGHLIGHTED | 164 _incognito ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO_HIGHLIGHTED |
| 165 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_HIGHLIGHTED; | 165 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_HIGHLIGHTED; |
| 166 UIImage* appendImageSelected = NativeImage(appendSelectedResourceID); | 166 UIImage* appendImageSelected = |
| 167 NativeReversableImage(appendSelectedResourceID, YES); |
| 167 [_appendButton setImage:appendImageSelected | 168 [_appendButton setImage:appendImageSelected |
| 168 forState:UIControlStateHighlighted]; | 169 forState:UIControlStateHighlighted]; |
| 169 } | 170 } |
| 170 | 171 |
| 171 - (NSString*)accessibilityLabel { | 172 - (NSString*)accessibilityLabel { |
| 172 return _textTruncatingLabel.attributedText.string; | 173 return _textTruncatingLabel.attributedText.string; |
| 173 } | 174 } |
| 174 | 175 |
| 175 - (NSString*)accessibilityValue { | 176 - (NSString*)accessibilityValue { |
| 176 return _detailTruncatingLabel.attributedText.string; | 177 return _detailTruncatingLabel.attributedText.string; |
| 177 } | 178 } |
| 178 | 179 |
| 179 @end | 180 @end |
| OLD | NEW |