Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/ntp/google_landing_mediator.h" | 5 #import "ios/chrome/browser/ui/ntp/google_landing_mediator.h" |
| 6 | 6 |
| 7 #import "base/ios/weak_nsobject.h" | 7 #import "base/ios/weak_nsobject.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
| 10 #include "base/metrics/user_metrics_action.h" | 10 #include "base/metrics/user_metrics_action.h" |
| 11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
| 12 #include "components/ntp_tiles/metrics.h" | 12 #include "components/ntp_tiles/metrics.h" |
| 13 #include "components/ntp_tiles/most_visited_sites.h" | 13 #include "components/ntp_tiles/most_visited_sites.h" |
| 14 #include "components/ntp_tiles/ntp_tile.h" | 14 #include "components/ntp_tiles/ntp_tile.h" |
| 15 #include "components/rappor/rappor_service_impl.h" | 15 #include "components/rappor/rappor_service_impl.h" |
| 16 #include "components/search_engines/template_url_service.h" | 16 #include "components/search_engines/template_url_service.h" |
| 17 #include "components/search_engines/template_url_service_observer.h" | 17 #include "components/search_engines/template_url_service_observer.h" |
| 18 #include "ios/chrome/browser/application_context.h" | 18 #include "ios/chrome/browser/application_context.h" |
| 19 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 19 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 20 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_cache_factory.h" | 20 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_cache_factory.h" |
| 21 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_service_factory.h" | 21 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_service_factory.h" |
| 22 #import "ios/chrome/browser/metrics/new_tab_page_uma.h" | 22 #import "ios/chrome/browser/metrics/new_tab_page_uma.h" |
| 23 #include "ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.h" | 23 #include "ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.h" |
| 24 #import "ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h" | 24 #import "ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h" |
| 25 #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" | 25 #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" |
| 26 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 26 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
| 27 #import "ios/chrome/browser/ui/browser_view_controller.h" | 27 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 28 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" | 28 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" |
| 29 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 29 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
| 30 #import "ios/chrome/browser/ui/ntp/google_landing_commands.h" | |
| 30 #import "ios/chrome/browser/ui/ntp/google_landing_consumer.h" | 31 #import "ios/chrome/browser/ui/ntp/google_landing_consumer.h" |
| 31 #import "ios/chrome/browser/ui/ntp/notification_promo_whats_new.h" | 32 #import "ios/chrome/browser/ui/ntp/notification_promo_whats_new.h" |
| 32 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" | 33 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
| 33 #import "ios/chrome/browser/ui/url_loader.h" | 34 #import "ios/chrome/browser/ui/url_loader.h" |
| 34 #import "ios/chrome/browser/web_state_list/web_state_list.h" | 35 #import "ios/chrome/browser/web_state_list/web_state_list.h" |
| 35 #import "ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h" | 36 #import "ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h" |
| 36 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 37 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| 37 #include "ios/public/provider/chrome/browser/voice/voice_search_provider.h" | 38 #include "ios/public/provider/chrome/browser/voice/voice_search_provider.h" |
| 39 #import "ios/shared/chrome/browser/ui/commands/command_dispatcher.h" | |
| 38 #include "ios/web/public/web_state/web_state.h" | 40 #include "ios/web/public/web_state/web_state.h" |
| 39 | 41 |
| 40 using base::UserMetricsAction; | 42 using base::UserMetricsAction; |
| 41 | 43 |
| 42 namespace { | 44 namespace { |
| 43 | 45 |
| 44 const NSInteger kMaxNumMostVisitedFavicons = 8; | 46 const NSInteger kMaxNumMostVisitedFavicons = 8; |
| 45 | 47 |
| 46 } // namespace | 48 } // namespace |
| 47 | 49 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 75 SearchEngineObserver::~SearchEngineObserver() { | 77 SearchEngineObserver::~SearchEngineObserver() { |
| 76 _templateURLService->RemoveObserver(this); | 78 _templateURLService->RemoveObserver(this); |
| 77 } | 79 } |
| 78 | 80 |
| 79 void SearchEngineObserver::OnTemplateURLServiceChanged() { | 81 void SearchEngineObserver::OnTemplateURLServiceChanged() { |
| 80 [_owner updateShowLogo]; | 82 [_owner updateShowLogo]; |
| 81 } | 83 } |
| 82 | 84 |
| 83 } // namespace google_landing | 85 } // namespace google_landing |
| 84 | 86 |
| 85 @interface GoogleLandingMediator ()<MostVisitedSitesObserving, | 87 @interface GoogleLandingMediator ()<GoogleLandingCommands, |
| 88 MostVisitedSitesObserving, | |
| 86 WebStateListObserving> { | 89 WebStateListObserving> { |
| 87 // The ChromeBrowserState associated with this mediator. | 90 // The ChromeBrowserState associated with this mediator. |
| 88 ios::ChromeBrowserState* _browserState; // Weak. | 91 ios::ChromeBrowserState* _browserState; // Weak. |
| 89 | 92 |
| 90 // |YES| if impressions were logged already and shouldn't be logged again. | 93 // |YES| if impressions were logged already and shouldn't be logged again. |
| 91 BOOL _recordedPageImpression; | 94 BOOL _recordedPageImpression; |
| 92 | 95 |
| 93 // The designated url loader. | |
| 94 id<UrlLoader> _loader; // Weak. | |
| 95 | |
| 96 // Delegate to focus and blur the omnibox. | |
| 97 base::WeakNSProtocol<id<OmniboxFocuser>> _focuser; | |
| 98 | |
| 99 // Controller to fetch and show doodles or a default Google logo. | 96 // Controller to fetch and show doodles or a default Google logo. |
| 100 base::scoped_nsprotocol<id<LogoVendor>> _doodleController; | 97 base::scoped_nsprotocol<id<LogoVendor>> _doodleController; |
| 101 | 98 |
| 102 // Listen for default search engine changes. | 99 // Listen for default search engine changes. |
| 103 std::unique_ptr<google_landing::SearchEngineObserver> _observer; | 100 std::unique_ptr<google_landing::SearchEngineObserver> _observer; |
| 104 TemplateURLService* _templateURLService; // weak | 101 TemplateURLService* _templateURLService; // weak |
| 105 | 102 |
| 106 // A MostVisitedSites::Observer bridge object to get notified of most visited | 103 // A MostVisitedSites::Observer bridge object to get notified of most visited |
| 107 // sites changes. | 104 // sites changes. |
| 108 std::unique_ptr<ntp_tiles::MostVisitedSitesObserverBridge> | 105 std::unique_ptr<ntp_tiles::MostVisitedSitesObserverBridge> |
| 109 _mostVisitedObserverBridge; | 106 _mostVisitedObserverBridge; |
| 110 | 107 |
| 111 std::unique_ptr<ntp_tiles::MostVisitedSites> _mostVisitedSites; | 108 std::unique_ptr<ntp_tiles::MostVisitedSites> _mostVisitedSites; |
| 112 | 109 |
| 113 // Most visited data from the MostVisitedSites service (copied upon receiving | 110 // Most visited data from the MostVisitedSites service (copied upon receiving |
| 114 // the callback). | 111 // the callback). |
| 115 ntp_tiles::NTPTilesVector _mostVisitedData; | 112 ntp_tiles::NTPTilesVector _mostVisitedData; |
| 116 | 113 |
| 117 base::WeakNSProtocol<id<WebToolbarDelegate>> _webToolbarDelegate; | |
| 118 | |
| 119 // Observes the WebStateList so that this mediator can update the UI when the | 114 // Observes the WebStateList so that this mediator can update the UI when the |
| 120 // active WebState changes. | 115 // active WebState changes. |
| 121 std::unique_ptr<WebStateListObserverBridge> _webStateListObserver; | 116 std::unique_ptr<WebStateListObserverBridge> _webStateListObserver; |
| 122 | 117 |
| 123 // What's new promo. | 118 // What's new promo. |
| 124 std::unique_ptr<NotificationPromoWhatsNew> _notification_promo; | 119 std::unique_ptr<NotificationPromoWhatsNew> _notification_promo; |
| 125 } | 120 } |
| 126 | 121 |
| 127 // Consumer to handle google landing update notifications. | 122 // Consumer to handle google landing update notifications. |
| 128 @property(nonatomic) id<GoogleLandingConsumer> consumer; | 123 @property(nonatomic) id<GoogleLandingConsumer> consumer; |
| 129 | 124 |
| 130 // The WebStateList that is being observed by this mediator. | 125 // The WebStateList that is being observed by this mediator. |
| 131 @property(nonatomic, assign) WebStateList* webStateList; | 126 @property(nonatomic, assign) WebStateList* webStateList; |
| 132 | 127 |
| 133 // Perform initial setup. | 128 // Perform initial setup. |
| 134 - (void)setUp; | 129 - (void)setUp; |
| 135 | 130 |
| 136 @end | 131 @end |
| 137 | 132 |
| 138 @implementation GoogleLandingMediator | 133 @implementation GoogleLandingMediator |
| 139 | 134 |
| 140 @synthesize consumer = _consumer; | 135 @synthesize consumer = _consumer; |
| 136 @synthesize dispatcher = _dispatcher; | |
| 141 @synthesize webStateList = _webStateList; | 137 @synthesize webStateList = _webStateList; |
| 142 | 138 |
| 143 - (instancetype)initWithConsumer:(id<GoogleLandingConsumer>)consumer | 139 - (instancetype)initWithConsumer:(id<GoogleLandingConsumer>)consumer |
| 144 browserState:(ios::ChromeBrowserState*)browserState | 140 browserState:(ios::ChromeBrowserState*)browserState |
| 145 loader:(id<UrlLoader>)loader | |
| 146 focuser:(id<OmniboxFocuser>)focuser | |
| 147 webToolbarDelegate:(id<WebToolbarDelegate>)webToolbarDelegate | |
| 148 webStateList:(WebStateList*)webStateList { | 141 webStateList:(WebStateList*)webStateList { |
| 149 self = [super init]; | 142 self = [super init]; |
| 150 if (self) { | 143 if (self) { |
| 151 self.consumer = consumer; | 144 self.consumer = consumer; |
| 152 _browserState = browserState; | 145 _browserState = browserState; |
| 153 _loader = loader; | |
| 154 _focuser.reset(focuser); | |
| 155 _webToolbarDelegate.reset(webToolbarDelegate); | |
| 156 _webStateList = webStateList; | 146 _webStateList = webStateList; |
| 157 | 147 |
| 158 _webStateListObserver = base::MakeUnique<WebStateListObserverBridge>(self); | 148 _webStateListObserver = base::MakeUnique<WebStateListObserverBridge>(self); |
| 159 _webStateList->AddObserver(_webStateListObserver.get()); | 149 _webStateList->AddObserver(_webStateListObserver.get()); |
| 160 | 150 |
| 161 [self setUp]; | 151 [self setUp]; |
| 162 } | 152 } |
| 163 return self; | 153 return self; |
| 164 } | 154 } |
| 165 | 155 |
| 166 - (void)dealloc { | 156 - (void)dealloc { |
| 157 [self.dispatcher stopDispatchingForProtocol:@protocol(GoogleLandingCommands)]; | |
| 167 _webStateList->RemoveObserver(_webStateListObserver.get()); | 158 _webStateList->RemoveObserver(_webStateListObserver.get()); |
| 168 [[NSNotificationCenter defaultCenter] removeObserver:self.consumer]; | 159 [[NSNotificationCenter defaultCenter] removeObserver:self.consumer]; |
| 169 [super dealloc]; | 160 [super dealloc]; |
| 170 } | 161 } |
| 171 | 162 |
| 172 - (void)setUp { | 163 - (void)setUp { |
| 173 self.consumer.isOffTheRecord = _browserState->IsOffTheRecord(); | 164 self.consumer.isOffTheRecord = _browserState->IsOffTheRecord(); |
| 174 self.consumer.voiceSearchIsEnabled = ios::GetChromeBrowserProvider() | 165 self.consumer.voiceSearchIsEnabled = ios::GetChromeBrowserProvider() |
| 175 ->GetVoiceSearchProvider() | 166 ->GetVoiceSearchProvider() |
| 176 ->IsVoiceSearchEnabled(); | 167 ->IsVoiceSearchEnabled(); |
| 177 self.consumer.maximumMostVisitedSitesShown = [self.class maxSitesShown]; | 168 self.consumer.maximumMostVisitedSitesShown = [self.class maxSitesShown]; |
| 178 self.consumer.tabCount = self.webStateList->count(); | 169 self.consumer.tabCount = self.webStateList->count(); |
| 179 | 170 |
| 180 // Set up template URL service to listen for default search engine changes. | 171 // Set up template URL service to listen for default search engine changes. |
| 181 _templateURLService = | 172 _templateURLService = |
| 182 ios::TemplateURLServiceFactory::GetForBrowserState(_browserState); | 173 ios::TemplateURLServiceFactory::GetForBrowserState(_browserState); |
| 183 _observer.reset( | 174 _observer.reset( |
| 184 new google_landing::SearchEngineObserver(self, _templateURLService)); | 175 new google_landing::SearchEngineObserver(self, _templateURLService)); |
| 185 _templateURLService->Load(); | 176 _templateURLService->Load(); |
| 186 _doodleController.reset(ios::GetChromeBrowserProvider()->CreateLogoVendor( | 177 _doodleController.reset(ios::GetChromeBrowserProvider()->CreateLogoVendor( |
| 187 _browserState, _loader)); | 178 _browserState, self.dispatcher)); |
| 188 self.consumer.logoVendor = _doodleController; | 179 self.consumer.logoVendor = _doodleController; |
| 189 [self updateShowLogo]; | 180 [self updateShowLogo]; |
| 190 | 181 |
| 191 // Set up most visited sites. This call may have the side effect of | 182 // Set up most visited sites. This call may have the side effect of |
| 192 // triggering -onMostVisitedURLsAvailable immediately, which can load the | 183 // triggering -onMostVisitedURLsAvailable immediately, which can load the |
| 193 // view before dataSource is set. | 184 // view before dataSource is set. |
| 194 _mostVisitedSites = | 185 _mostVisitedSites = |
| 195 IOSMostVisitedSitesFactory::NewForBrowserState(_browserState); | 186 IOSMostVisitedSitesFactory::NewForBrowserState(_browserState); |
| 196 _mostVisitedObserverBridge.reset( | 187 _mostVisitedObserverBridge.reset( |
| 197 new ntp_tiles::MostVisitedSitesObserverBridge(self)); | 188 new ntp_tiles::MostVisitedSitesObserverBridge(self)); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 214 // Set up what's new. | 205 // Set up what's new. |
| 215 _notification_promo.reset( | 206 _notification_promo.reset( |
| 216 new NotificationPromoWhatsNew(GetApplicationContext()->GetLocalState())); | 207 new NotificationPromoWhatsNew(GetApplicationContext()->GetLocalState())); |
| 217 _notification_promo->Init(); | 208 _notification_promo->Init(); |
| 218 self.consumer.promoText = | 209 self.consumer.promoText = |
| 219 base::SysUTF8ToNSString(_notification_promo->promo_text()); | 210 base::SysUTF8ToNSString(_notification_promo->promo_text()); |
| 220 self.consumer.promoIcon = _notification_promo->icon(); | 211 self.consumer.promoIcon = _notification_promo->icon(); |
| 221 self.consumer.promoCanShow = _notification_promo->CanShow(); | 212 self.consumer.promoCanShow = _notification_promo->CanShow(); |
| 222 } | 213 } |
| 223 | 214 |
| 215 - (void)setDispatcher:(id)dispatcher { | |
| 216 _dispatcher = dispatcher; | |
| 217 [self.dispatcher startDispatchingToTarget:self | |
| 218 forProtocol:@protocol(GoogleLandingCommands)]; | |
| 219 } | |
| 220 | |
| 224 - (void)updateShowLogo { | 221 - (void)updateShowLogo { |
| 225 BOOL showLogo = NO; | 222 BOOL showLogo = NO; |
| 226 TemplateURL* defaultURL = _templateURLService->GetDefaultSearchProvider(); | 223 TemplateURL* defaultURL = _templateURLService->GetDefaultSearchProvider(); |
| 227 if (defaultURL) { | 224 if (defaultURL) { |
| 228 showLogo = | 225 showLogo = |
| 229 defaultURL->GetEngineType(_templateURLService->search_terms_data()) == | 226 defaultURL->GetEngineType(_templateURLService->search_terms_data()) == |
| 230 SEARCH_ENGINE_GOOGLE; | 227 SEARCH_ENGINE_GOOGLE; |
| 231 } | 228 } |
| 232 self.consumer.logoIsShowing = showLogo; | 229 self.consumer.logoIsShowing = showLogo; |
| 233 } | 230 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 DCHECK(_notification_promo); | 318 DCHECK(_notification_promo); |
| 322 _notification_promo->HandleViewed(); | 319 _notification_promo->HandleViewed(); |
| 323 self.consumer.promoCanShow = _notification_promo->CanShow(); | 320 self.consumer.promoCanShow = _notification_promo->CanShow(); |
| 324 } | 321 } |
| 325 - (void)promoTapped { | 322 - (void)promoTapped { |
| 326 DCHECK(_notification_promo); | 323 DCHECK(_notification_promo); |
| 327 _notification_promo->HandleClosed(); | 324 _notification_promo->HandleClosed(); |
| 328 self.consumer.promoCanShow = _notification_promo->CanShow(); | 325 self.consumer.promoCanShow = _notification_promo->CanShow(); |
| 329 | 326 |
| 330 if (_notification_promo->IsURLPromo()) { | 327 if (_notification_promo->IsURLPromo()) { |
| 331 [_loader webPageOrderedOpen:_notification_promo->url() | 328 [self.dispatcher webPageOrderedOpen:_notification_promo->url() |
| 332 referrer:web::Referrer() | 329 referrer:web::Referrer() |
| 333 inBackground:NO | 330 inBackground:NO |
| 334 appendTo:kCurrentTab]; | 331 appendTo:kCurrentTab]; |
| 335 return; | 332 return; |
| 336 } | 333 } |
| 337 | 334 |
| 338 if (_notification_promo->IsChromeCommand()) { | 335 if (_notification_promo->IsChromeCommand()) { |
| 339 base::scoped_nsobject<GenericChromeCommand> command( | 336 base::scoped_nsobject<GenericChromeCommand> command( |
| 340 [[GenericChromeCommand alloc] | 337 [[GenericChromeCommand alloc] |
| 341 initWithTag:_notification_promo->command_id()]); | 338 initWithTag:_notification_promo->command_id()]); |
| 342 [self.consumer chromeExecuteCommand:command]; | 339 [self.dispatcher chromeExecuteCommand:command]; |
|
marq (ping after 24h)
2017/04/20 13:17:14
Where does the dispatching and handling for this g
justincohen
2017/04/20 21:28:31
in BVC.
| |
| 343 return; | 340 return; |
| 344 } | 341 } |
| 345 NOTREACHED(); | 342 NOTREACHED(); |
| 346 } | 343 } |
| 347 | 344 |
| 348 - (BOOL)canGoForward { | 345 - (BOOL)canGoForward { |
| 349 web::WebState* webState = _webStateList->GetActiveWebState(); | 346 web::WebState* webState = _webStateList->GetActiveWebState(); |
| 350 if (webState) | 347 if (webState) |
| 351 return webState->GetNavigationManager()->CanGoForward(); | 348 return webState->GetNavigationManager()->CanGoForward(); |
| 352 return NO; | 349 return NO; |
| 353 } | 350 } |
| 354 | 351 |
| 355 - (BOOL)canGoBack { | 352 - (BOOL)canGoBack { |
| 356 web::WebState* webState = _webStateList->GetActiveWebState(); | 353 web::WebState* webState = _webStateList->GetActiveWebState(); |
| 357 if (webState) | 354 if (webState) |
| 358 return webState->GetNavigationManager()->CanGoBack(); | 355 return webState->GetNavigationManager()->CanGoBack(); |
| 359 return NO; | 356 return NO; |
| 360 } | 357 } |
| 361 | 358 |
| 362 - (void)prepareToEnterTabSwitcher:(id)sender { | |
| 363 [_webToolbarDelegate prepareToEnterTabSwitcher:sender]; | |
| 364 } | |
| 365 | |
| 366 #pragma mark - UrlLoader | |
| 367 | |
| 368 - (void)loadURL:(const GURL&)url | |
| 369 referrer:(const web::Referrer&)referrer | |
| 370 transition:(ui::PageTransition)transition | |
| 371 rendererInitiated:(BOOL)rendererInitiated { | |
| 372 [_loader loadURL:url | |
| 373 referrer:referrer | |
| 374 transition:transition | |
| 375 rendererInitiated:rendererInitiated]; | |
| 376 } | |
| 377 | |
| 378 - (void)webPageOrderedOpen:(const GURL&)url | |
| 379 referrer:(const web::Referrer&)referrer | |
| 380 inBackground:(BOOL)inBackground | |
| 381 appendTo:(OpenPosition)appendTo { | |
| 382 [_loader webPageOrderedOpen:url | |
| 383 referrer:referrer | |
| 384 inBackground:inBackground | |
| 385 appendTo:appendTo]; | |
| 386 } | |
| 387 | |
| 388 - (void)webPageOrderedOpen:(const GURL&)url | |
| 389 referrer:(const web::Referrer&)referrer | |
| 390 inIncognito:(BOOL)inIncognito | |
| 391 inBackground:(BOOL)inBackground | |
| 392 appendTo:(OpenPosition)appendTo { | |
| 393 [_loader webPageOrderedOpen:url | |
| 394 referrer:referrer | |
| 395 inIncognito:inIncognito | |
| 396 inBackground:inBackground | |
| 397 appendTo:appendTo]; | |
| 398 } | |
| 399 | |
| 400 - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab { | |
| 401 NOTREACHED(); | |
| 402 } | |
| 403 | |
| 404 - (void)loadJavaScriptFromLocationBar:(NSString*)script { | |
| 405 NOTREACHED(); | |
| 406 } | |
| 407 | |
| 408 #pragma mark - OmniboxFocuser | |
| 409 | |
| 410 - (void)focusOmnibox { | |
| 411 [_focuser focusOmnibox]; | |
| 412 } | |
| 413 | |
| 414 - (void)cancelOmniboxEdit { | |
| 415 [_focuser cancelOmniboxEdit]; | |
| 416 } | |
| 417 | |
| 418 - (void)focusFakebox { | |
| 419 [_focuser focusFakebox]; | |
| 420 } | |
| 421 | |
| 422 - (void)onFakeboxBlur { | |
| 423 [_focuser onFakeboxBlur]; | |
| 424 } | |
| 425 | |
| 426 - (void)onFakeboxAnimationComplete { | |
| 427 [_focuser onFakeboxAnimationComplete]; | |
| 428 } | |
| 429 | 359 |
| 430 @end | 360 @end |
| OLD | NEW |