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

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

Issue 2829003002: Add CommandDispatcher to BrowserViewController. (Closed)
Patch Set: Cleaner Created 3 years, 8 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"
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"
15 11
16 class ReadingListModel; 12 class ReadingListModel;
17 class LargeIconCache; 13 class LargeIconCache;
18 namespace favicon { 14 namespace favicon {
19 class LargeIconService; 15 class LargeIconService;
20 } 16 }
21 @class TabModel;
22 @protocol WebToolbarDelegate;
23 17
24 // DataSource for the google landing controller. 18 // DataSource for the google landing controller.
25 // TODO(crbug.com/694750): Most everything here can be moved to dispatcher. 19 // TODO(crbug.com/694750): Most everything here can be moved to dispatcher.
26 @protocol GoogleLandingDataSource<OmniboxFocuser, UrlLoader> 20 @protocol GoogleLandingDataSource
27
28 // Removes a blacklisted URL in both |_mostVisitedData|.
29 - (void)removeBlacklistedURL:(const GURL&)url;
30
31 // Adds URL to the blacklist in both |_mostVisitedData|.
32 - (void)addBlacklistedURL:(const GURL&)url;
33
34 // Logs a histogram due to a Most Visited item being opened.
35 - (void)logMostVisitedClick:(const NSUInteger)visitedIndex
36 tileType:(ntp_tiles::TileVisualType)tileType;
37
38 // Called when a what's new promo is viewed.
39 - (void)promoViewed;
40
41 // Called when a what's new promo is tapped.
42 - (void)promoTapped;
43
44 // |YES| if the google landing toolbar can show the forward arrow.
45 - (BOOL)canGoForward;
46
47 // |YES| if the google landing toolbar can show the back arrow.//
48 - (BOOL)canGoBack;
49
50 // Called before the fake tab switcher icon is tapped.
51 - (void)prepareToEnterTabSwitcher:(id)sender;
52 21
53 // TODO(crbug.com/694750): The following two methods should be moved to the 22 // TODO(crbug.com/694750): The following two methods should be moved to the
54 // consumer, and converted into types more suitable for a consumer. 23 // consumer, and converted into types more suitable for a consumer.
55 // Gets an a most visited NTP tile at |index|. 24 // Gets an a most visited NTP tile at |index|.
56 - (ntp_tiles::NTPTile)mostVisitedAtIndex:(NSUInteger)index; 25 - (ntp_tiles::NTPTile)mostVisitedAtIndex:(NSUInteger)index;
57 26
58 // Gets the number of most visited entries. 27 // Gets the number of most visited entries.
59 - (NSUInteger)mostVisitedSize; 28 - (NSUInteger)mostVisitedSize;
60 29
61 // TODO(crbug.com/694750): The following three properties will be removed in 30 // TODO(crbug.com/694750): The following three properties will be removed in
62 // subsequent CLs, with data provided via GoogleDataConsumer into types more 31 // subsequent CLs, with data provided via GoogleDataConsumer into types more
63 // suitable for a consumer. 32 // suitable for a consumer.
64 33
65 // Gets the reading list model. 34 // Gets the reading list model.
66 - (ReadingListModel*)readingListModel; 35 - (ReadingListModel*)readingListModel;
67 36
68 // Gets the large icon cache. 37 // Gets the large icon cache.
69 - (LargeIconCache*)largeIconCache; 38 - (LargeIconCache*)largeIconCache;
70 39
71 // Gets the large icon service. 40 // Gets the large icon service.
72 - (favicon::LargeIconService*)largeIconService; 41 - (favicon::LargeIconService*)largeIconService;
73 42
74
75
76 @end 43 @end
77 44
78 #endif // IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_DATA_SOURCE_H_ 45 #endif // IOS_CHROME_BROWSER_UI_NTP_GOOGLE_LANDING_DATA_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698