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

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

Issue 773103004: Remove NOTIFICATION_HISTORY_URLS_DELETED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to tip Created 5 years, 11 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 990734497ef991cd8540748b1326ecd2de3485a5..d7f3041ee0b45f13fef512564c9b41944ad6dbc3 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.h
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.h
@@ -20,9 +20,7 @@
#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"
-class NotificationRegistrar;
class PageUsageData;
class Profile;
class TabRestoreService;
@@ -58,8 +56,7 @@ struct FaviconImageResult;
// unlike the typical ownership model, this bridge owns its controller. The
// controller is very thin and only exists to interact with Cocoa, but this
// class does the bulk of the work.
-class HistoryMenuBridge : public content::NotificationObserver,
- public TabRestoreServiceObserver,
+class HistoryMenuBridge : public TabRestoreServiceObserver,
public MainMenuItem,
public history::HistoryServiceObserver {
public:
@@ -129,11 +126,6 @@ class HistoryMenuBridge : public content::NotificationObserver,
explicit HistoryMenuBridge(Profile* profile);
~HistoryMenuBridge() override;
- // content::NotificationObserver:
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
-
// TabRestoreServiceObserver:
void TabRestoreServiceChanged(TabRestoreService* service) override;
void TabRestoreServiceDestroyed(TabRestoreService* service) override;
@@ -142,16 +134,6 @@ class HistoryMenuBridge : public content::NotificationObserver,
void ResetMenu() override;
void BuildMenu() override;
- // history::HistoryServiceObserver:
- void OnURLVisited(HistoryService* history_service,
- ui::PageTransition transition,
- const history::URLRow& row,
- const history::RedirectList& redirects,
- base::Time visit_time) override;
- void OnURLsModified(HistoryService* history_service,
- const history::URLRows& changed_urls) override;
- void OnHistoryServiceLoaded(HistoryService* service) override;
-
// Looks up an NSMenuItem in the |menu_item_map_| and returns the
// corresponding HistoryItem.
HistoryItem* HistoryItemForMenuItem(NSMenuItem* item);
@@ -219,13 +201,27 @@ class HistoryMenuBridge : public content::NotificationObserver,
friend class ::HistoryMenuBridgeTest;
friend class HistoryMenuCocoaControllerTest;
+ // history::HistoryServiceObserver:
+ void OnURLVisited(HistoryService* history_service,
+ ui::PageTransition transition,
+ const history::URLRow& row,
+ const history::RedirectList& redirects,
+ base::Time visit_time) override;
+ void OnURLsModified(HistoryService* history_service,
+ const history::URLRows& changed_urls) override;
+ void OnURLsDeleted(HistoryService* history_service,
+ bool all_history,
+ bool expired,
+ const history::URLRows& deleted_rows,
+ const std::set<GURL>& favicon_urls) override;
+ void OnHistoryServiceLoaded(HistoryService* service) override;
+
base::scoped_nsobject<HistoryMenuCocoaController> controller_; // strong
Profile* profile_; // weak
HistoryService* history_service_; // weak
TabRestoreService* tab_restore_service_; // weak
- content::NotificationRegistrar registrar_;
base::CancelableTaskTracker cancelable_task_tracker_;
// Mapping of NSMenuItems to HistoryItems. This owns the HistoryItems until
« 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