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

Side by Side Diff: ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.h

Issue 2739873003: Remove suggestions notified as invalid (Closed)
Patch Set: Update comment Created 3 years, 9 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_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDG E_OBSERVER_H_ 5 #ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDG E_OBSERVER_H_
6 #define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDG E_OBSERVER_H_ 6 #define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDG E_OBSERVER_H_
7 7
8 #include "components/ntp_snippets/content_suggestions_service.h" 8 #include "components/ntp_snippets/content_suggestions_service.h"
9 9
10 // Observes ContentSuggestionsService events from Objective-C. To use as a 10 // Observes ContentSuggestionsService events from Objective-C. To use as a
11 // ntp_snippets::ContentSuggestionsService::Observer, wrap in a 11 // ntp_snippets::ContentSuggestionsService::Observer, wrap in a
12 // ContentSuggestionsServiceBridge. 12 // ContentSuggestionsServiceBridge.
13 @protocol ContentSuggestionsServiceObserver 13 @protocol ContentSuggestionsServiceObserver
14 14
15 // Invoked by ntp_snippets::ContentSuggestionsService::OnNewSuggestions. 15 // Invoked by ntp_snippets::ContentSuggestionsService::OnNewSuggestions.
16 - (void)contentSuggestionsService: 16 - (void)contentSuggestionsService:
17 (ntp_snippets::ContentSuggestionsService*)suggestionsService 17 (ntp_snippets::ContentSuggestionsService*)suggestionsService
18 newSuggestionsInCategory:(ntp_snippets::Category)category; 18 newSuggestionsInCategory:(ntp_snippets::Category)category;
19 19
20 // Invoked by ntp_snippets::ContentSuggestionsService::OnCategoryStatusChanged. 20 // Invoked by ntp_snippets::ContentSuggestionsService::OnCategoryStatusChanged.
21 - (void)contentSuggestionsService: 21 - (void)contentSuggestionsService:
22 (ntp_snippets::ContentSuggestionsService*)suggestionsService 22 (ntp_snippets::ContentSuggestionsService*)suggestionsService
23 category:(ntp_snippets::Category)category 23 category:(ntp_snippets::Category)category
24 statusChangedTo:(ntp_snippets::CategoryStatus)status; 24 statusChangedTo:(ntp_snippets::CategoryStatus)status;
25 25
26 // Invoked by ntp_snippets::ContentSuggestionsService::OnSuggestionInvalidated. 26 // Invoked by ntp_snippets::ContentSuggestionsService::OnSuggestionInvalidated.
27 - (void)contentSuggestionsService: 27 - (void)contentSuggestionsService:
28 (ntp_snippets::ContentSuggestionsService*)suggestionsService 28 (ntp_snippets::ContentSuggestionsService*)suggestionsService
29 SuggestionInvalidated: 29 suggestionInvalidated:
30 (const ntp_snippets::ContentSuggestion::ID&)suggestion_id; 30 (const ntp_snippets::ContentSuggestion::ID&)suggestion_id;
31 31
32 // Invoked by ntp_snippets::ContentSuggestionsService::OnFullRefreshRequired. 32 // Invoked by ntp_snippets::ContentSuggestionsService::OnFullRefreshRequired.
33 - (void)contentSuggestionsServiceFullRefreshRequired: 33 - (void)contentSuggestionsServiceFullRefreshRequired:
34 (ntp_snippets::ContentSuggestionsService*)suggestionsService; 34 (ntp_snippets::ContentSuggestionsService*)suggestionsService;
35 35
36 // Invoked by 36 // Invoked by
37 // ntp_snippets::ContentSuggestionsService::ContentSuggestionsServiceShutdown. 37 // ntp_snippets::ContentSuggestionsService::ContentSuggestionsServiceShutdown.
38 - (void)contentSuggestionsServiceShutdown: 38 - (void)contentSuggestionsServiceShutdown:
39 (ntp_snippets::ContentSuggestionsService*)suggestionsService; 39 (ntp_snippets::ContentSuggestionsService*)suggestionsService;
(...skipping 20 matching lines...) Expand all
60 void OnFullRefreshRequired() override; 60 void OnFullRefreshRequired() override;
61 void ContentSuggestionsServiceShutdown() override; 61 void ContentSuggestionsServiceShutdown() override;
62 62
63 __unsafe_unretained id<ContentSuggestionsServiceObserver> observer_; 63 __unsafe_unretained id<ContentSuggestionsServiceObserver> observer_;
64 ntp_snippets::ContentSuggestionsService* service_; // weak 64 ntp_snippets::ContentSuggestionsService* service_; // weak
65 65
66 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceBridge); 66 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceBridge);
67 }; 67 };
68 68
69 #endif // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BR IDGE_OBSERVER_H_ 69 #endif // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BR IDGE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698