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 #ifndef IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_MEDIATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_MEDIATOR_H_ |
6 #define IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_MEDIATOR_H_ | 6 #define IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_MEDIATOR_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #import "ios/chrome/browser/ui/ntp/google_landing_data_source.h" | 10 #import "ios/chrome/browser/ui/ntp/google_landing_data_source.h" |
| 11 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
11 | 12 |
| 13 @protocol ChromeExecuteCommand; |
12 @protocol GoogleLandingConsumer; | 14 @protocol GoogleLandingConsumer; |
13 @protocol OmniboxFocuser; | 15 @protocol OmniboxFocuser; |
14 @protocol UrlLoader; | 16 @protocol UrlLoader; |
15 class WebStateList; | 17 class WebStateList; |
16 | 18 |
17 namespace ios { | 19 namespace ios { |
18 class ChromeBrowserState; | 20 class ChromeBrowserState; |
19 } | 21 } |
20 | 22 |
21 // A mediator object that provides various data sources for google landing. | 23 // A mediator object that provides various data sources for google landing. |
22 @interface GoogleLandingMediator : NSObject<GoogleLandingDataSource> | 24 @interface GoogleLandingMediator : NSObject<GoogleLandingDataSource> |
23 | 25 |
24 - (instancetype)initWithConsumer:(id<GoogleLandingConsumer>)consumer | 26 - (instancetype)initWithConsumer:(id<GoogleLandingConsumer>)consumer |
25 browserState:(ios::ChromeBrowserState*)browserState | 27 browserState:(ios::ChromeBrowserState*)browserState |
26 loader:(id<UrlLoader>)loader | 28 dispatcher:(id<ChromeExecuteCommand, UrlLoader>)dispatcher |
27 focuser:(id<OmniboxFocuser>)focuser | |
28 webToolbarDelegate:(id<WebToolbarDelegate>)webToolbarDelegate | |
29 webStateList:(WebStateList*)webStateList | 29 webStateList:(WebStateList*)webStateList |
30 NS_DESIGNATED_INITIALIZER; | 30 NS_DESIGNATED_INITIALIZER; |
31 - (instancetype)init NS_UNAVAILABLE; | 31 - (instancetype)init NS_UNAVAILABLE; |
32 | 32 |
33 // Stop listening to any observers and other cleanup functionality. | 33 // Stop listening to any observers and other cleanup functionality. |
34 - (void)shutdown; | 34 - (void)shutdown; |
35 | 35 |
36 // Get the maximum number of sites shown. | 36 // Get the maximum number of sites shown. |
37 + (NSUInteger)maxSitesShown; | 37 + (NSUInteger)maxSitesShown; |
38 | 38 |
39 @end | 39 @end |
40 | 40 |
41 #endif // IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_MEDIATOR_H_ | 41 #endif // IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_MEDIATOR_H_ |
OLD | NEW |