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

Unified Diff: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h

Issue 2793443003: Removed NOTIFICATION_BROWSER_CLOSING notification (Closed)
Patch Set: Removed NOTIFICATION_BROWSER_CLOSING as separate patch Created 3 years, 7 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/ash/launcher/browser_shortcut_launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h
index a800f2114f1760ff99b3598baf509856d7104e4d..0cb3ba1d61505dbbe16306b4dd01c73689519dff 100644
--- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h
@@ -6,10 +6,10 @@
#define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_
#include "base/macros.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
#include "chrome/browser/ui/browser_list.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "chrome/browser/ui/browser_list_observer.h"
namespace ash {
class ShelfModel;
@@ -25,7 +25,7 @@ class ChromeLauncherController;
// This item shows an application menu that lists open browser windows or tabs.
class BrowserShortcutLauncherItemController
: public LauncherItemController,
- public content::NotificationObserver {
+ public chrome::BrowserListObserver {
public:
BrowserShortcutLauncherItemController(ChromeLauncherController* controller,
ash::ShelfModel* shelf_model);
@@ -64,18 +64,16 @@ class BrowserShortcutLauncherItemController
// Get a list of active browsers.
BrowserList::BrowserVector GetListOfActiveBrowsers();
- // content::NotificationObserver:
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ // chrome::BrowserListObserver:
+ void OnBrowserCloseStarted(Browser* browser) override;
ash::ShelfModel* shelf_model_;
// The cached list of open browser windows shown in an application menu.
BrowserList::BrowserVector browser_menu_items_;
- // Registers for notifications of closing browser windows.
- content::NotificationRegistrar registrar_;
+ // Observer for browser windows closing events.
+ ScopedObserver<BrowserList, BrowserListObserver> browser_list_observer_;
DISALLOW_COPY_AND_ASSIGN(BrowserShortcutLauncherItemController);
};

Powered by Google App Engine
This is Rietveld 408576698