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

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

Issue 8375027: Implement notifications for the DisplayBalloon method on Linux and Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing DisplayBalloon argument order (good). Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/status_icons/status_icon.h" 12 #include "chrome/browser/status_icons/desktop_notification_balloon_impl.h"
13 #include "ui/base/gtk/gtk_signal.h" 13 #include "ui/base/gtk/gtk_signal.h"
14 14
15 class MenuGtk; 15 class MenuGtk;
16 class SkBitmap; 16 class SkBitmap;
17 17
18 class StatusIconGtk : public StatusIcon { 18 class StatusIconGtk : public DesktopNotificationBalloonImpl {
19 public: 19 public:
20 StatusIconGtk(); 20 StatusIconGtk();
21 virtual ~StatusIconGtk(); 21 virtual ~StatusIconGtk();
22 22
23 // Overridden from StatusIcon: 23 // Overridden from StatusIcon:
24 virtual void SetImage(const SkBitmap& image) OVERRIDE; 24 virtual void SetImage(const SkBitmap& image) OVERRIDE;
25 virtual void SetPressedImage(const SkBitmap& image) OVERRIDE; 25 virtual void SetPressedImage(const SkBitmap& image) OVERRIDE;
26 virtual void SetToolTip(const string16& tool_tip) OVERRIDE; 26 virtual void SetToolTip(const string16& tool_tip) OVERRIDE;
27 virtual void DisplayBalloon(const SkBitmap& icon,
28 const string16& title,
29 const string16& contents);
30 27
31 // Exposed for testing. 28 // Exposed for testing.
32 CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick); 29 CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick);
33 30
34 protected: 31 protected:
35 // Overridden from StatusIcon. 32 // Overridden from StatusIcon.
36 virtual void UpdatePlatformContextMenu(ui::MenuModel* menu); 33 virtual void UpdatePlatformContextMenu(ui::MenuModel* menu);
37 34
38 private: 35 private:
39 // Callback invoked when user right-clicks on the status icon. 36 // Callback invoked when user right-clicks on the status icon.
40 CHROMEGTK_CALLBACK_2(StatusIconGtk, void, OnPopupMenu, guint, guint); 37 CHROMEGTK_CALLBACK_2(StatusIconGtk, void, OnPopupMenu, guint, guint);
41 38
42 // The currently-displayed icon for the window. 39 // The currently-displayed icon for the window.
43 GtkStatusIcon* icon_; 40 GtkStatusIcon* icon_;
44 41
45 // The context menu for this icon (if any). 42 // The context menu for this icon (if any).
46 scoped_ptr<MenuGtk> menu_; 43 scoped_ptr<MenuGtk> menu_;
47 44
48 DISALLOW_COPY_AND_ASSIGN(StatusIconGtk); 45 DISALLOW_COPY_AND_ASSIGN(StatusIconGtk);
49 }; 46 };
50 47
51 #endif // CHROME_BROWSER_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_ 48 #endif // CHROME_BROWSER_UI_GTK_STATUS_ICONS_STATUS_ICON_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698