| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_BROWSER_H_ | |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_BROWSER_H_ | |
| 7 | |
| 8 #include "ash/public/cpp/shelf_application_menu_item.h" | |
| 9 #include "base/macros.h" | |
| 10 #include "content/public/browser/notification_observer.h" | |
| 11 #include "content/public/browser/notification_registrar.h" | |
| 12 | |
| 13 class Browser; | |
| 14 | |
| 15 // A shelf application menu item for a running browser. | |
| 16 class ChromeLauncherAppMenuItemBrowser : public ash::ShelfApplicationMenuItem, | |
| 17 public content::NotificationObserver { | |
| 18 public: | |
| 19 ChromeLauncherAppMenuItemBrowser(const base::string16 title, | |
| 20 const gfx::Image* icon, | |
| 21 Browser* browser); | |
| 22 ~ChromeLauncherAppMenuItemBrowser() override; | |
| 23 | |
| 24 // ash::ShelfApplicationMenuItem: | |
| 25 void Execute(int event_flags) override; | |
| 26 | |
| 27 private: | |
| 28 // content::NotificationObserver. | |
| 29 void Observe(int type, | |
| 30 const content::NotificationSource& source, | |
| 31 const content::NotificationDetails& details) override; | |
| 32 | |
| 33 // The browser which is associated which this item. | |
| 34 Browser* browser_; | |
| 35 | |
| 36 content::NotificationRegistrar registrar_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItemBrowser); | |
| 39 }; | |
| 40 | |
| 41 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_BROWSER_
H_ | |
| OLD | NEW |