| OLD | NEW |
| 1 // Copyright (c) 2011 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_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual void SetToolTip(const string16& tool_tip) OVERRIDE; | 27 virtual void SetToolTip(const string16& tool_tip) OVERRIDE; |
| 28 virtual void DisplayBalloon(const SkBitmap& icon, | 28 virtual void DisplayBalloon(const SkBitmap& icon, |
| 29 const string16& title, | 29 const string16& title, |
| 30 const string16& contents) OVERRIDE; | 30 const string16& contents) OVERRIDE; |
| 31 | 31 |
| 32 // Exposed for testing. | 32 // Exposed for testing. |
| 33 CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick); | 33 CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick); |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 // Overridden from StatusIcon. | 36 // Overridden from StatusIcon. |
| 37 virtual void UpdatePlatformContextMenu(ui::MenuModel* menu); | 37 virtual void UpdatePlatformContextMenu(ui::MenuModel* menu) OVERRIDE; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 // Callback invoked when user right-clicks on the status icon. | 40 // Callback invoked when user right-clicks on the status icon. |
| 41 CHROMEGTK_CALLBACK_2(StatusIconGtk, void, OnPopupMenu, guint, guint); | 41 CHROMEGTK_CALLBACK_2(StatusIconGtk, void, OnPopupMenu, guint, guint); |
| 42 | 42 |
| 43 // The currently-displayed icon for the window. | 43 // The currently-displayed icon for the window. |
| 44 GtkStatusIcon* icon_; | 44 GtkStatusIcon* icon_; |
| 45 | 45 |
| 46 // The context menu for this icon (if any). | 46 // The context menu for this icon (if any). |
| 47 scoped_ptr<MenuGtk> menu_; | 47 scoped_ptr<MenuGtk> menu_; |
| 48 | 48 |
| 49 // Notification balloon. | 49 // Notification balloon. |
| 50 DesktopNotificationBalloon notification_; | 50 DesktopNotificationBalloon notification_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(StatusIconGtk); | 52 DISALLOW_COPY_AND_ASSIGN(StatusIconGtk); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 #endif // CHROME_BROWSER_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ | 55 #endif // CHROME_BROWSER_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ |
| OLD | NEW |