OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ios/chrome/browser/translate/before_translate_infobar_controller.h" | 5 #include "ios/chrome/browser/translate/before_translate_infobar_controller.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 [_navigationBar setAutoresizingMask:resizingMask]; | 294 [_navigationBar setAutoresizingMask:resizingMask]; |
295 base::scoped_nsobject<UIBarButtonItem> doneButton([[UIBarButtonItem alloc] | 295 base::scoped_nsobject<UIBarButtonItem> doneButton([[UIBarButtonItem alloc] |
296 initWithBarButtonSystemItem:UIBarButtonSystemItemDone | 296 initWithBarButtonSystemItem:UIBarButtonSystemItemDone |
297 target:self | 297 target:self |
298 action:@selector(languageSelectionDone)]); | 298 action:@selector(languageSelectionDone)]); |
299 base::scoped_nsobject<UIBarButtonItem> cancelButton([[UIBarButtonItem alloc] | 299 base::scoped_nsobject<UIBarButtonItem> cancelButton([[UIBarButtonItem alloc] |
300 initWithBarButtonSystemItem:UIBarButtonSystemItemCancel | 300 initWithBarButtonSystemItem:UIBarButtonSystemItemCancel |
301 target:self | 301 target:self |
302 action:@selector(dismissLanguageSelectionView)]); | 302 action:@selector(dismissLanguageSelectionView)]); |
303 base::scoped_nsobject<UINavigationItem> item( | 303 base::scoped_nsobject<UINavigationItem> item( |
304 [[UINavigationItem alloc] initWithTitle:nil]); | 304 [[UINavigationItem alloc] initWithTitle:@""]); |
305 [item setRightBarButtonItem:doneButton]; | 305 [item setRightBarButtonItem:doneButton]; |
306 [item setLeftBarButtonItem:cancelButton]; | 306 [item setLeftBarButtonItem:cancelButton]; |
307 [item setHidesBackButton:YES]; | 307 [item setHidesBackButton:YES]; |
308 [_navigationBar pushNavigationItem:item animated:NO]; | 308 [_navigationBar pushNavigationItem:item animated:NO]; |
309 | 309 |
310 // Creates the PickerView and its controller. | 310 // Creates the PickerView and its controller. |
311 NSInteger selectedRow; | 311 NSInteger selectedRow; |
312 NSInteger disabledRow; | 312 NSInteger disabledRow; |
313 if (_languageSelectionType == | 313 if (_languageSelectionType == |
314 TranslateInfoBarIOSTag::BEFORE_SOURCE_LANGUAGE) { | 314 TranslateInfoBarIOSTag::BEFORE_SOURCE_LANGUAGE) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 [super removeView]; | 349 [super removeView]; |
350 [self dismissLanguageSelectionView]; | 350 [self dismissLanguageSelectionView]; |
351 } | 351 } |
352 | 352 |
353 - (void)detachView { | 353 - (void)detachView { |
354 [super detachView]; | 354 [super detachView]; |
355 [self dismissLanguageSelectionView]; | 355 [self dismissLanguageSelectionView]; |
356 } | 356 } |
357 | 357 |
358 @end | 358 @end |
OLD | NEW |