| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_MEDIATOR_H_ |
| 6 #define IOS_CLEAN_CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_MEDIATOR_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 #include <memory> |
| 10 |
| 11 #import "ios/shared/chrome/browser/ui/omnibox/location_bar_delegate.h" |
| 12 |
| 13 class LocationBarController; |
| 14 class WebStateList; |
| 15 |
| 16 // LocationBarMediator listens for notifications from various models and updates |
| 17 // the UI accordingly. Unlike other mediators in the new architecture, |
| 18 // LocationBarMediator is constrained to operate within the confines of the |
| 19 // cross-platform omnibox component. Specifically, LocationBarMediator does not |
| 20 // have a |consumer| property, but rather it updates the UI through methods on |
| 21 // LocationBarController and OmniboxViewIOS. |
| 22 @interface LocationBarMediator : NSObject<LocationBarDelegate> |
| 23 |
| 24 - (instancetype)initWithWebStateList:(WebStateList*)webStateList |
| 25 NS_DESIGNATED_INITIALIZER; |
| 26 |
| 27 - (instancetype)init NS_UNAVAILABLE; |
| 28 |
| 29 // Sets the LocationBarController that this mediator should use when updating |
| 30 // UI. Unlike other mediators in the new architecture, LocationBarMediator |
| 31 // updates the UI through this LocationBarController object rather than through |
| 32 // a consumer. |
| 33 - (void)setLocationBar:(std::unique_ptr<LocationBarController>)locationBar; |
| 34 |
| 35 @end |
| 36 |
| 37 #endif // IOS_CLEAN_CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_MEDIATOR_H_ |
| OLD | NEW |