OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 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_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_MATERIAL_VIEW_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_MATERIAL_VIEW_CONTROLLER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #include "components/omnibox/browser/autocomplete_result.h" |
| 11 |
| 12 namespace web { |
| 13 class ImageDataFetcher; |
| 14 } |
| 15 |
| 16 class OmniboxPopupViewIOS; |
| 17 |
| 18 // View controller used to display a list of omnibox autocomplete matches in the |
| 19 // omnibox popup. |
| 20 @interface OmniboxPopupMaterialViewController : UITableViewController |
| 21 |
| 22 @property(nonatomic, assign) BOOL incognito; |
| 23 |
| 24 // Designated initializer. Creates a table view with UITableViewStylePlain. |
| 25 // Takes ownership of |imageFetcher|. |
| 26 - (instancetype)initWithPopupView:(OmniboxPopupViewIOS*)view |
| 27 withFetcher: |
| 28 (std::unique_ptr<web::ImageDataFetcher>)imageFetcher; |
| 29 |
| 30 // Updates the current data and forces a redraw. If animation is YES, adds |
| 31 // CALayer animations to fade the OmniboxPopupMaterialRows in. |
| 32 - (void)updateMatches:(const AutocompleteResult&)result |
| 33 withAnimation:(BOOL)animation; |
| 34 |
| 35 // Set text alignment for popup cells. |
| 36 - (void)setTextAlignment:(NSTextAlignment)alignment; |
| 37 |
| 38 @end |
| 39 |
| 40 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_MATERIAL_VIEW_CONTROLLER_
H_ |
OLD | NEW |