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