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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.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 class TabStripModel; | |
18 | |
19 // A menu item controller for a running browser tab. It gets created when an | 17 // A menu item controller for a running browser tab. It gets created when an |
20 // application/tab list gets created. It's main purpose is to add the | 18 // application/tab list gets created. It's main purpose is to add the |
21 // activation method to the |ChromeLauncherAppMenuItem| class. | 19 // activation method to the |ChromeLauncherAppMenuItem| class. |
22 class ChromeLauncherAppMenuItemTab | 20 class ChromeLauncherAppMenuItemTab |
23 : public ChromeLauncherAppMenuItem, | 21 : public ChromeLauncherAppMenuItem, |
24 public content::WebContentsObserver { | 22 public content::WebContentsObserver { |
25 public: | 23 public: |
26 ChromeLauncherAppMenuItemTab(const base::string16 title, | 24 ChromeLauncherAppMenuItemTab(const base::string16 title, |
27 const gfx::Image* icon, | 25 const gfx::Image* icon, |
28 content::WebContents* content, | 26 content::WebContents* content, |
29 bool has_leading_separator); | 27 bool has_leading_separator); |
30 bool IsActive() const override; | 28 bool IsActive() const override; |
31 bool IsEnabled() const override; | 29 bool IsEnabled() const override; |
32 void Execute(int event_flags) override; | 30 void Execute(int event_flags) override; |
33 | 31 |
34 private: | 32 private: |
35 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItemTab); | 33 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItemTab); |
36 }; | 34 }; |
37 | 35 |
38 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ | 36 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_ |
OLD | NEW |