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

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

Issue 2953613002: Stop re-adding subviews to keyboard accessory view. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/web_toolbar_controller.h" 5 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h"
6 6
7 #import <CoreLocation/CoreLocation.h> 7 #import <CoreLocation/CoreLocation.h>
8 #include <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 ui::PAGE_TRANSITION_LINK | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); 1845 ui::PAGE_TRANSITION_LINK | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
1846 [self.urlLoader loadURL:GURL(searchURL) 1846 [self.urlLoader loadURL:GURL(searchURL)
1847 referrer:web::Referrer() 1847 referrer:web::Referrer()
1848 transition:transition 1848 transition:transition
1849 rendererInitiated:NO]; 1849 rendererInitiated:NO];
1850 } 1850 }
1851 } 1851 }
1852 1852
1853 - (UIView*)keyboardAccessoryView { 1853 - (UIView*)keyboardAccessoryView {
1854 if (!_keyboardAccessoryView) { 1854 if (!_keyboardAccessoryView) {
1855 // The new keyboard accessory view is only used on iPhones as iPads have a 1855 if (experimental_flags::IsKeyboardAccessoryViewWithCameraSearchEnabled()) {
1856 // different pattern regarding keyboard shortcuts.
1857 if (experimental_flags::IsKeyboardAccessoryViewWithCameraSearchEnabled() &&
1858 !IsIPadIdiom()) {
1859 // The '.' shortcut is left out because the new keyboard accessory view 1856 // The '.' shortcut is left out because the new keyboard accessory view
1860 // has less free space for the shortcut buttons, and the '.' is already 1857 // has less free space for the shortcut buttons, and the '.' is already
1861 // present in the standard iOS keyboard. 1858 // present in the standard iOS keyboard.
1862 NSArray<NSString*>* buttonTitles = @[ @":", @"-", @"/", kDotComTLD ]; 1859 NSArray<NSString*>* buttonTitles = @[ @":", @"-", @"/", kDotComTLD ];
1863 _keyboardAccessoryView = 1860 _keyboardAccessoryView =
1864 [[NewKeyboardAccessoryView alloc] initWithButtons:buttonTitles 1861 [[NewKeyboardAccessoryView alloc] initWithButtons:buttonTitles
1865 delegate:self]; 1862 delegate:self];
1866 } else { 1863 } else {
1867 NSArray<NSString*>* buttonTitles = 1864 NSArray<NSString*>* buttonTitles =
1868 @[ @":", @".", @"-", @"/", kDotComTLD ]; 1865 @[ @":", @".", @"-", @"/", kDotComTLD ];
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2470 2467
2471 - (BOOL)isPrerenderAnimationRunning { 2468 - (BOOL)isPrerenderAnimationRunning {
2472 return _prerenderAnimating; 2469 return _prerenderAnimating;
2473 } 2470 }
2474 2471
2475 - (OmniboxTextFieldIOS*)omnibox { 2472 - (OmniboxTextFieldIOS*)omnibox {
2476 return _omniBox; 2473 return _omniBox;
2477 } 2474 }
2478 2475
2479 @end 2476 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698