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

Unified Diff: chrome/browser/ui/gtk/global_history_menu.h

Issue 6901110: GTK: Query TopSites for the Most Visited pages and populate fill in the global History menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make TopSites broadcast its change notification on all blacklist/pinned url changes. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/global_history_menu.h
diff --git a/chrome/browser/ui/gtk/global_history_menu.h b/chrome/browser/ui/gtk/global_history_menu.h
index fff3c998231acd658594dd8a256a338a9aac9701..38d6488dea8fc2738fe9c226d3520e66f1f37849 100644
--- a/chrome/browser/ui/gtk/global_history_menu.h
+++ b/chrome/browser/ui/gtk/global_history_menu.h
@@ -7,15 +7,21 @@
#include <map>
-#include "content/browser/cancelable_request.h"
#include "chrome/browser/favicon_service.h"
+#include "chrome/browser/history/history_types.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
+#include "content/browser/cancelable_request.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
class Browser;
+
+namespace history {
+class TopSites;
+}
+
typedef struct _GdkPixbuf GdkPixbuf;
// Controls the History menu.
@@ -36,6 +42,12 @@ class GlobalHistoryMenu : public NotificationObserver,
typedef std::map<GtkWidget*, HistoryItem*> MenuItemToHistoryMap;
+ // Sends a message off to History for data.
+ void GetTopSitesData();
+
+ // Callback to receive data requested from GetTopSitesData().
+ void OnTopSitesReceived(const history::MostVisitedURLList& visited_list);
+
// Returns the currently existing HistoryItem associated with
// |menu_item|. Can return NULL.
HistoryItem* HistoryItemForMenuItem(GtkWidget* menu_item);
@@ -91,6 +103,9 @@ class GlobalHistoryMenu : public NotificationObserver,
Browser* browser_;
Profile* profile_;
+ history::TopSites* top_sites_;
+ CancelableRequestConsumer top_sites_consumer_;
+
NotificationRegistrar registrar_;
GdkPixbuf* default_favicon_;

Powered by Google App Engine
This is Rietveld 408576698