| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ | 6 #define CHROME_BROWSER_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include "chrome/browser/ui/gtk/status_icons/status_icon_gtk.h" |
| 10 | 10 // TODO(msw): remove this file once all includes have been updated. |
| 11 #include "app/gtk_signal.h" | |
| 12 #include "chrome/browser/status_icons/status_icon.h" | |
| 13 | |
| 14 class MenuGtk; | |
| 15 class SkBitmap; | |
| 16 | |
| 17 class StatusIconGtk : public StatusIcon { | |
| 18 public: | |
| 19 StatusIconGtk(); | |
| 20 virtual ~StatusIconGtk(); | |
| 21 | |
| 22 // Overridden from StatusIcon: | |
| 23 virtual void SetImage(const SkBitmap& image); | |
| 24 virtual void SetPressedImage(const SkBitmap& image); | |
| 25 virtual void SetToolTip(const string16& tool_tip); | |
| 26 | |
| 27 // Exposed for testing. | |
| 28 CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick); | |
| 29 | |
| 30 protected: | |
| 31 // Overridden from StatusIcon. | |
| 32 virtual void UpdatePlatformContextMenu(menus::MenuModel* menu); | |
| 33 | |
| 34 private: | |
| 35 // Callback invoked when user right-clicks on the status icon. | |
| 36 CHROMEGTK_CALLBACK_2(StatusIconGtk, void, OnPopupMenu, guint, guint); | |
| 37 | |
| 38 // The currently-displayed icon for the window. | |
| 39 GtkStatusIcon* icon_; | |
| 40 | |
| 41 // The context menu for this icon (if any). | |
| 42 scoped_ptr<MenuGtk> menu_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(StatusIconGtk); | |
| 45 }; | |
| 46 | 11 |
| 47 #endif // CHROME_BROWSER_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ | 12 #endif // CHROME_BROWSER_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ |
| OLD | NEW |