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/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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 base::RecordAction(UserMetricsAction("MobileFirstTextInOmnibox")); | 1311 base::RecordAction(UserMetricsAction("MobileFirstTextInOmnibox")); |
1312 } | 1312 } |
1313 [_keyboardVoiceSearchButton setHidden:editingAndNotEmpty]; | 1313 [_keyboardVoiceSearchButton setHidden:editingAndNotEmpty]; |
1314 } | 1314 } |
1315 | 1315 |
1316 - (web::WebState*)getWebState { | 1316 - (web::WebState*)getWebState { |
1317 return [self.delegate currentWebState]; | 1317 return [self.delegate currentWebState]; |
1318 } | 1318 } |
1319 | 1319 |
1320 - (ToolbarModel*)toolbarModel { | 1320 - (ToolbarModel*)toolbarModel { |
1321 ToolbarModelIOS* toolbarModelIOS = [self.delegate toolbarModelIOS]; | 1321 return [self.delegate toolbarModelIOS]; |
1322 return toolbarModelIOS ? toolbarModelIOS->GetToolbarModel() : nullptr; | |
1323 } | 1322 } |
1324 | 1323 |
1325 #pragma mark - | 1324 #pragma mark - |
1326 #pragma mark OmniboxFocuser methods. | 1325 #pragma mark OmniboxFocuser methods. |
1327 | 1326 |
1328 - (void)focusOmnibox { | 1327 - (void)focusOmnibox { |
1329 if (![_webToolbar isHidden]) | 1328 if (![_webToolbar isHidden]) |
1330 [_omniBox becomeFirstResponder]; | 1329 [_omniBox becomeFirstResponder]; |
1331 } | 1330 } |
1332 | 1331 |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 | 2562 |
2564 - (BOOL)isPrerenderAnimationRunning { | 2563 - (BOOL)isPrerenderAnimationRunning { |
2565 return _prerenderAnimating; | 2564 return _prerenderAnimating; |
2566 } | 2565 } |
2567 | 2566 |
2568 - (OmniboxTextFieldIOS*)omnibox { | 2567 - (OmniboxTextFieldIOS*)omnibox { |
2569 return _omniBox.get(); | 2568 return _omniBox.get(); |
2570 } | 2569 } |
2571 | 2570 |
2572 @end | 2571 @end |
OLD | NEW |