| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ |
| 7 | 7 |
| 8 #include "ash/public/cpp/shelf_application_menu_item.h" |
| 8 #include "base/macros.h" | 9 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" | |
| 11 #include "content/public/browser/web_contents_observer.h" | 11 #include "content/public/browser/web_contents_observer.h" |
| 12 | 12 |
| 13 namespace content{ | 13 namespace content{ |
| 14 class WebContents; | 14 class WebContents; |
| 15 } | 15 } |
| 16 | 16 |
| 17 // A menu item controller for a running browser tab. It gets created when an | 17 // A shelf application menu item for a running browser tab. |
| 18 // application/tab list gets created. It's main purpose is to add the | 18 class ChromeLauncherAppMenuItemTab : public ash::ShelfApplicationMenuItem, |
| 19 // activation method to the |ChromeLauncherAppMenuItem| class. | 19 public content::WebContentsObserver { |
| 20 class ChromeLauncherAppMenuItemTab | |
| 21 : public ChromeLauncherAppMenuItem, | |
| 22 public content::WebContentsObserver { | |
| 23 public: | 20 public: |
| 24 ChromeLauncherAppMenuItemTab(const base::string16 title, | 21 ChromeLauncherAppMenuItemTab(const base::string16 title, |
| 25 const gfx::Image* icon, | 22 const gfx::Image* icon, |
| 26 content::WebContents* content, | 23 content::WebContents* content); |
| 27 bool has_leading_separator); | 24 |
| 28 bool IsEnabled() const override; | 25 // ash::ShelfApplicationMenuItem: |
| 29 void Execute(int event_flags) override; | 26 void Execute(int event_flags) override; |
| 30 | 27 |
| 31 private: | 28 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItemTab); | 29 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItemTab); |
| 33 }; | 30 }; |
| 34 | 31 |
| 35 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ | 32 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ |
| OLD | NEW |