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

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

Issue 1921933004: More consistency in m_v_s_bridge.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Protected destructor Created 4 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
« no previous file with comments | « no previous file | chrome/browser/android/ntp/most_visited_sites_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MOST_VISITED_SITES_H_ 5 #ifndef CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_
6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ 6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 struct Suggestion; 49 struct Suggestion;
50 using SuggestionsVector = std::vector<Suggestion>; 50 using SuggestionsVector = std::vector<Suggestion>;
51 using PopularSitesVector = std::vector<PopularSites::Site>; 51 using PopularSitesVector = std::vector<PopularSites::Site>;
52 52
53 // The source of the Most Visited sites. 53 // The source of the Most Visited sites.
54 enum MostVisitedSource { TOP_SITES, SUGGESTIONS_SERVICE, POPULAR, WHITELIST }; 54 enum MostVisitedSource { TOP_SITES, SUGGESTIONS_SERVICE, POPULAR, WHITELIST };
55 55
56 // The observer to be notified when the list of most visited sites changes. 56 // The observer to be notified when the list of most visited sites changes.
57 class Observer { 57 class Observer {
58 public: 58 public:
59 virtual ~Observer() {}
60
61 virtual void OnMostVisitedURLsAvailable( 59 virtual void OnMostVisitedURLsAvailable(
62 const SuggestionsVector& suggestions) = 0; 60 const SuggestionsVector& suggestions) = 0;
63 virtual void OnPopularURLsAvailable(const PopularSitesVector& sites) = 0; 61 virtual void OnPopularURLsAvailable(const PopularSitesVector& sites) = 0;
62
63 protected:
64 virtual ~Observer() {}
64 }; 65 };
65 66
66 struct Suggestion { 67 struct Suggestion {
67 base::string16 title; 68 base::string16 title;
68 GURL url; 69 GURL url;
69 MostVisitedSource source; 70 MostVisitedSource source;
70 71
71 // Only valid for source == WHITELIST (empty otherwise). 72 // Only valid for source == WHITELIST (empty otherwise).
72 base::FilePath whitelist_icon_path; 73 base::FilePath whitelist_icon_path;
73 74
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 241
241 SuggestionsVector current_suggestions_; 242 SuggestionsVector current_suggestions_;
242 243
243 // For callbacks may be run after destruction. 244 // For callbacks may be run after destruction.
244 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; 245 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_;
245 246
246 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); 247 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites);
247 }; 248 };
248 249
249 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ 250 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/ntp/most_visited_sites_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698