| OLD | NEW |
| 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_MOST_VISITED_SITES_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void OnSuggestionsProfileAvailable( | 75 void OnSuggestionsProfileAvailable( |
| 76 const suggestions::SuggestionsProfile& suggestions_profile); | 76 const suggestions::SuggestionsProfile& suggestions_profile); |
| 77 | 77 |
| 78 void AddPopularSites(std::vector<base::string16>* titles, | 78 void AddPopularSites(std::vector<base::string16>* titles, |
| 79 std::vector<std::string>* urls); | 79 std::vector<std::string>* urls); |
| 80 | 80 |
| 81 // Notify the Java side observer about the availability of Most Visited Urls. | 81 // Notify the Java side observer about the availability of Most Visited Urls. |
| 82 void NotifyMostVisitedURLsObserver(const std::vector<base::string16>& titles, | 82 void NotifyMostVisitedURLsObserver(const std::vector<base::string16>& titles, |
| 83 const std::vector<std::string>& urls); | 83 const std::vector<std::string>& urls); |
| 84 | 84 |
| 85 void NotifyPopularURLsObserver(const std::vector<std::string>& urls, |
| 86 const std::vector<std::string>& favicon_urls); |
| 87 |
| 85 void OnPopularSitesAvailable(bool success); | 88 void OnPopularSitesAvailable(bool success); |
| 86 | 89 |
| 87 // Runs on the UI Thread. | 90 // Runs on the UI Thread. |
| 88 void OnLocalThumbnailFetched( | 91 void OnLocalThumbnailFetched( |
| 89 const GURL& url, | 92 const GURL& url, |
| 90 scoped_ptr<base::android::ScopedJavaGlobalRef<jobject>> j_callback, | 93 scoped_ptr<base::android::ScopedJavaGlobalRef<jobject>> j_callback, |
| 91 scoped_ptr<SkBitmap> bitmap); | 94 scoped_ptr<SkBitmap> bitmap); |
| 92 | 95 |
| 93 // Callback for when the thumbnail lookup is complete. | 96 // Callback for when the thumbnail lookup is complete. |
| 94 // Runs on the UI Thread. | 97 // Runs on the UI Thread. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 140 |
| 138 scoped_ptr<PopularSites> popular_sites_; | 141 scoped_ptr<PopularSites> popular_sites_; |
| 139 | 142 |
| 140 // For callbacks may be run after destruction. | 143 // For callbacks may be run after destruction. |
| 141 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 144 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; |
| 142 | 145 |
| 143 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 146 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); |
| 144 }; | 147 }; |
| 145 | 148 |
| 146 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 149 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| OLD | NEW |