OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_NTP_SUGGESTIONS_COMBINER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_COMBINER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_COMBINER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_COMBINER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 virtual ~Delegate() {} | 31 virtual ~Delegate() {} |
32 | 32 |
33 // Method that is called when new suggestions are ready from the | 33 // Method that is called when new suggestions are ready from the |
34 // SuggestionsCombiner. | 34 // SuggestionsCombiner. |
35 virtual void OnSuggestionsReady() = 0; | 35 virtual void OnSuggestionsReady() = 0; |
36 }; | 36 }; |
37 | 37 |
38 virtual ~SuggestionsCombiner(); | 38 virtual ~SuggestionsCombiner(); |
39 | 39 |
40 explicit SuggestionsCombiner(SuggestionsCombiner::Delegate* delegate, | 40 SuggestionsCombiner(SuggestionsCombiner::Delegate* delegate, |
41 Profile* profile); | 41 Profile* profile); |
42 | 42 |
43 // Add a new source. The SuggestionsCombiner takes ownership of |source|. | 43 // Add a new source. The SuggestionsCombiner takes ownership of |source|. |
44 void AddSource(SuggestionsSource* source); | 44 void AddSource(SuggestionsSource* source); |
45 | 45 |
46 // Enables or disables debug mode. If debug mode is enabled, the sources are | 46 // Enables or disables debug mode. If debug mode is enabled, the sources are |
47 // expected to provide additional data, which could be displayed, for example, | 47 // expected to provide additional data, which could be displayed, for example, |
48 // in the chrome://suggestions-internals/ page. | 48 // in the chrome://suggestions-internals/ page. |
49 void EnableDebug(bool enable); | 49 void EnableDebug(bool enable); |
50 | 50 |
51 // Fetch a new set of items from the various suggestion sources. | 51 // Fetch a new set of items from the various suggestion sources. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Whether debug mode is enabled or not (debug mode provides more data in the | 104 // Whether debug mode is enabled or not (debug mode provides more data in the |
105 // results). | 105 // results). |
106 bool debug_enabled_; | 106 bool debug_enabled_; |
107 | 107 |
108 Profile* profile_; | 108 Profile* profile_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(SuggestionsCombiner); | 110 DISALLOW_COPY_AND_ASSIGN(SuggestionsCombiner); |
111 }; | 111 }; |
112 | 112 |
113 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_COMBINER_H_ | 113 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_COMBINER_H_ |
OLD | NEW |