OLD | NEW |
---|---|
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 COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_SCHEDULER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_SCHEDULER_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_SCHEDULER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_SCHEDULER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 | 9 |
10 namespace ntp_snippets { | 10 namespace ntp_snippets { |
11 | 11 |
12 // Interface for informing the scheduler. | 12 // Interface for informing the scheduler. |
13 class RemoteSuggestionsScheduler { | 13 class RemoteSuggestionsScheduler { |
14 public: | 14 public: |
15 // External triggers to consider fetching content suggestions. Returns whether | |
16 // a fetch will actually be triggered. | |
17 virtual bool OnBrowserStartup() = 0; | |
tschumann
2016/12/21 14:27:37
is the return value actually of interest?
the call
jkrcal
2016/12/21 14:35:21
Ah, you are right. I wanted to implement some hist
| |
18 virtual bool OnNTPOpened() = 0; | |
19 | |
15 // Fetch content suggestions. | 20 // Fetch content suggestions. |
16 virtual void OnPersistentSchedulerWakeUp() = 0; | 21 virtual void OnPersistentSchedulerWakeUp() = 0; |
17 | 22 |
18 // Force rescheduling of fetching. | 23 // Force rescheduling of fetching. |
19 virtual void RescheduleFetching() = 0; | 24 virtual void RescheduleFetching() = 0; |
20 }; | 25 }; |
21 | 26 |
22 } // namespace ntp_snippets | 27 } // namespace ntp_snippets |
23 | 28 |
24 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_SCHEDULER_H_ | 29 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_SCHEDULER_H_ |
OLD | NEW |