Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: chrome/browser/gtk/status_icons/status_icon_gtk.h

Issue 3189003: Added support for context menus to status icons. (Closed)
Patch Set: Final version. Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <gtk/gtk.h>
10 10
11 #include "app/gtk_signal.h" 11 #include "app/gtk_signal.h"
12 #include "chrome/browser/status_icons/status_icon.h" 12 #include "chrome/browser/status_icons/status_icon.h"
13 13
14 class SkBitmap; 14 class SkBitmap;
15 15
16 class StatusIconGtk : public StatusIcon { 16 class StatusIconGtk : public StatusIcon {
17 public: 17 public:
18 StatusIconGtk(); 18 StatusIconGtk();
19 virtual ~StatusIconGtk(); 19 virtual ~StatusIconGtk();
20 20
21 // Overridden from StatusIcon: 21 // Overridden from StatusIcon:
22 virtual void SetImage(const SkBitmap& image); 22 virtual void SetImage(const SkBitmap& image);
23 virtual void SetPressedImage(const SkBitmap& image); 23 virtual void SetPressedImage(const SkBitmap& image);
24 virtual void SetToolTip(const string16& tool_tip); 24 virtual void SetToolTip(const string16& tool_tip);
25 25
26 // Exposed for testing. 26 // Exposed for testing.
27 CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick); 27 CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick);
28 28
29 protected:
30 virtual void ResetContextMenu(menus::MenuModel* menu);
31
29 private: 32 private:
30 // The currently-displayed icon for the window. 33 // The currently-displayed icon for the window.
31 GtkStatusIcon* icon_; 34 GtkStatusIcon* icon_;
32 35
33 DISALLOW_COPY_AND_ASSIGN(StatusIconGtk); 36 DISALLOW_COPY_AND_ASSIGN(StatusIconGtk);
34 }; 37 };
35 38
36 #endif // CHROME_BROWSER_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ 39 #endif // CHROME_BROWSER_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/status_icons/status_icon_mac.mm ('k') | chrome/browser/gtk/status_icons/status_icon_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698