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

Unified Diff: chrome/browser/ui/cocoa/history_menu_bridge.h

Issue 651193002: Remove NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@373326.2
Patch Set: Address comments Created 6 years, 2 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/cocoa/history_menu_bridge.h
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.h b/chrome/browser/ui/cocoa/history_menu_bridge.h
index 088ac24a03a7edd6444e8dd656825b30eb6a5a11..0428f5e08d25a22a5b3d10b18e23b21d579d53ec 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.h
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.h
@@ -17,6 +17,7 @@
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#import "chrome/browser/ui/cocoa/main_menu_item.h"
+#include "components/history/core/browser/history_service_observer.h"
#include "components/sessions/session_id.h"
#include "content/public/browser/notification_observer.h"
@@ -58,7 +59,8 @@ struct FaviconImageResult;
// class does the bulk of the work.
class HistoryMenuBridge : public content::NotificationObserver,
public TabRestoreServiceObserver,
- public MainMenuItem {
+ public MainMenuItem,
+ public history::HistoryServiceObserver {
public:
// This is a generalization of the data we store in the history menu because
// we pull things from different sources with different data types.
@@ -139,6 +141,13 @@ class HistoryMenuBridge : public content::NotificationObserver,
virtual void ResetMenu() override;
virtual void BuildMenu() override;
+ // history::HistoryServiceObserver:
+ virtual void OnURLVisited(HistoryService* history_service,
+ ui::PageTransition transition,
+ const history::URLRow& row,
+ const history::RedirectList& redirects,
+ base::Time visit_time) override;
+
// Looks up an NSMenuItem in the |menu_item_map_| and returns the
// corresponding HistoryItem.
HistoryItem* HistoryItemForMenuItem(NSMenuItem* item);
@@ -176,6 +185,9 @@ class HistoryMenuBridge : public content::NotificationObserver,
// Does the query for the history information to create the menu.
void CreateMenu();
+ // Invoked when the History information has changed.
+ void OnHistoryChanged();
+
// Callback method for when HistoryService query results are ready with the
// most recently-visited sites.
void OnVisitedHistoryResults(history::QueryResults* results);
« no previous file with comments | « chrome/browser/sync/profile_sync_service_typed_url_unittest.cc ('k') | chrome/browser/ui/cocoa/history_menu_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698