Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: ios/chrome/browser/ui/ntp/google_landing_data_source.h

Issue 2829003002: Add CommandDispatcher to BrowserViewController. (Closed)
Patch Set: rohit comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_DATA_SOURCE_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_DATA_SOURCE_H_
6 #define IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_DATA_SOURCE_H_ 6 #define IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_DATA_SOURCE_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "components/ntp_tiles/ntp_tile.h" 10 #include "components/ntp_tiles/ntp_tile.h"
11 #include "components/ntp_tiles/tile_visual_type.h" 11 #include "components/ntp_tiles/tile_visual_type.h"
12 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h"
13 #import "ios/chrome/browser/ui/url_loader.h"
14 #include "url/gurl.h" 12 #include "url/gurl.h"
15 13
16 class ReadingListModel; 14 class ReadingListModel;
17 class LargeIconCache; 15 class LargeIconCache;
18 namespace favicon { 16 namespace favicon {
19 class LargeIconService; 17 class LargeIconService;
20 } 18 }
21 @class TabModel;
22 @protocol WebToolbarDelegate;
23 19
24 // DataSource for the google landing controller. 20 // DataSource for the google landing controller.
25 // TODO(crbug.com/694750): Most everything here can be moved to dispatcher. 21 // TODO(crbug.com/694750): Most everything here can be moved to dispatcher.
26 @protocol GoogleLandingDataSource<OmniboxFocuser, UrlLoader> 22 @protocol GoogleLandingDataSource
27 23
28 // Removes a blacklisted URL in both |_mostVisitedData|. 24 // Removes a blacklisted URL in both |_mostVisitedData|.
29 - (void)removeBlacklistedURL:(const GURL&)url; 25 - (void)removeBlacklistedURL:(const GURL&)url;
30 26
31 // Adds URL to the blacklist in both |_mostVisitedData|. 27 // Adds URL to the blacklist in both |_mostVisitedData|.
32 - (void)addBlacklistedURL:(const GURL&)url; 28 - (void)addBlacklistedURL:(const GURL&)url;
33 29
34 // Logs a histogram due to a Most Visited item being opened. 30 // Logs a histogram due to a Most Visited item being opened.
35 - (void)logMostVisitedClick:(const NSUInteger)visitedIndex 31 - (void)logMostVisitedClick:(const NSUInteger)visitedIndex
36 tileType:(ntp_tiles::TileVisualType)tileType; 32 tileType:(ntp_tiles::TileVisualType)tileType;
37 33
38 // Called when a what's new promo is viewed. 34 // Called when a what's new promo is viewed.
39 - (void)promoViewed; 35 - (void)promoViewed;
40 36
41 // Called when a what's new promo is tapped. 37 // Called when a what's new promo is tapped.
42 - (void)promoTapped; 38 - (void)promoTapped;
43 39
44 // TODO(crbug.com/694750): This should move to a dispatcher.
45 // Called before the fake tab switcher icon is tapped to save snapshots.
46 - (void)prepareToEnterTabSwitcher:(id)sender;
47
48 // TODO(crbug.com/694750): The following two methods should be moved to the 40 // TODO(crbug.com/694750): The following two methods should be moved to the
49 // consumer, and converted into types more suitable for a consumer. 41 // consumer, and converted into types more suitable for a consumer.
50 // Gets an a most visited NTP tile at |index|. 42 // Gets an a most visited NTP tile at |index|.
51 - (ntp_tiles::NTPTile)mostVisitedAtIndex:(NSUInteger)index; 43 - (ntp_tiles::NTPTile)mostVisitedAtIndex:(NSUInteger)index;
52 44
53 // Gets the number of most visited entries. 45 // Gets the number of most visited entries.
54 - (NSUInteger)mostVisitedSize; 46 - (NSUInteger)mostVisitedSize;
55 47
56 // TODO(crbug.com/694750): The following three properties will be removed in 48 // TODO(crbug.com/694750): The following three properties will be removed in
57 // subsequent CLs, with data provided via GoogleDataConsumer into types more 49 // subsequent CLs, with data provided via GoogleDataConsumer into types more
58 // suitable for a consumer. 50 // suitable for a consumer.
59 51
60 // Gets the reading list model. 52 // Gets the reading list model.
61 - (ReadingListModel*)readingListModel; 53 - (ReadingListModel*)readingListModel;
62 54
63 // Gets the large icon cache. 55 // Gets the large icon cache.
64 - (LargeIconCache*)largeIconCache; 56 - (LargeIconCache*)largeIconCache;
65 57
66 // Gets the large icon service. 58 // Gets the large icon service.
67 - (favicon::LargeIconService*)largeIconService; 59 - (favicon::LargeIconService*)largeIconService;
68 60
69
70
71 @end 61 @end
72 62
73 #endif // IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_DATA_SOURCE_H_ 63 #endif // IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/ntp/google_landing_controller_unittest.mm ('k') | ios/chrome/browser/ui/ntp/google_landing_mediator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698