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

Side by Side Diff: chrome/browser/android/ntp/ntp_snippets_bridge.h

Issue 2280543003: Remove snippet_id from ImageFetchedCallback (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/android/ntp/ntp_snippets_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
6 #define CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 6 #define CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // ContentSuggestionsService::Observer overrides 108 // ContentSuggestionsService::Observer overrides
109 void OnNewSuggestions(ntp_snippets::Category category) override; 109 void OnNewSuggestions(ntp_snippets::Category category) override;
110 void OnCategoryStatusChanged( 110 void OnCategoryStatusChanged(
111 ntp_snippets::Category category, 111 ntp_snippets::Category category,
112 ntp_snippets::CategoryStatus new_status) override; 112 ntp_snippets::CategoryStatus new_status) override;
113 void OnSuggestionInvalidated(ntp_snippets::Category category, 113 void OnSuggestionInvalidated(ntp_snippets::Category category,
114 const std::string& suggestion_id) override; 114 const std::string& suggestion_id) override;
115 void ContentSuggestionsServiceShutdown() override; 115 void ContentSuggestionsServiceShutdown() override;
116 116
117 void OnImageFetched(base::android::ScopedJavaGlobalRef<jobject> callback, 117 void OnImageFetched(base::android::ScopedJavaGlobalRef<jobject> callback,
118 const std::string& snippet_id,
119 const gfx::Image& image); 118 const gfx::Image& image);
120 119
121 ntp_snippets::Category CategoryFromIDValue(jint id); 120 ntp_snippets::Category CategoryFromIDValue(jint id);
122 121
123 ntp_snippets::ContentSuggestionsService* content_suggestions_service_; 122 ntp_snippets::ContentSuggestionsService* content_suggestions_service_;
124 history::HistoryService* history_service_; 123 history::HistoryService* history_service_;
125 base::CancelableTaskTracker tracker_; 124 base::CancelableTaskTracker tracker_;
126 125
127 ScopedObserver<ntp_snippets::ContentSuggestionsService, 126 ScopedObserver<ntp_snippets::ContentSuggestionsService,
128 ntp_snippets::ContentSuggestionsService::Observer> 127 ntp_snippets::ContentSuggestionsService::Observer>
129 content_suggestions_service_observer_; 128 content_suggestions_service_observer_;
130 129
131 // Used to notify the Java side when new snippets have been fetched. 130 // Used to notify the Java side when new snippets have been fetched.
132 base::android::ScopedJavaGlobalRef<jobject> observer_; 131 base::android::ScopedJavaGlobalRef<jobject> observer_;
133 132
134 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; 133 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_;
135 134
136 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); 135 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge);
137 }; 136 };
138 137
139 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 138 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/ntp/ntp_snippets_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698