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

Side by Side Diff: chrome/browser/gtk/notifications/balloon_view_gtk.h

Issue 1353003: GTK: Provide GTK+ themed notifications. (Closed)
Patch Set: Redraw on change Created 10 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/gtk/notifications/balloon_view_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Draws the view for the balloons. 5 // Draws the view for the balloons.
6 6
7 #ifndef CHROME_BROWSER_GTK_NOTIFICATIONS_BALLOON_VIEW_GTK_H_ 7 #ifndef CHROME_BROWSER_GTK_NOTIFICATIONS_BALLOON_VIEW_GTK_H_
8 #define CHROME_BROWSER_GTK_NOTIFICATIONS_BALLOON_VIEW_GTK_H_ 8 #define CHROME_BROWSER_GTK_NOTIFICATIONS_BALLOON_VIEW_GTK_H_
9 9
10 #include "app/animation.h" 10 #include "app/animation.h"
11 #include "app/gtk_signal.h" 11 #include "app/gtk_signal.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "chrome/browser/gtk/menu_gtk.h" 14 #include "chrome/browser/gtk/menu_gtk.h"
15 #include "chrome/browser/notifications/balloon.h" 15 #include "chrome/browser/notifications/balloon.h"
16 #include "chrome/common/notification_observer.h" 16 #include "chrome/common/notification_observer.h"
17 #include "chrome/common/notification_registrar.h" 17 #include "chrome/common/notification_registrar.h"
18 #include "gfx/point.h" 18 #include "gfx/point.h"
19 #include "gfx/rect.h" 19 #include "gfx/rect.h"
20 #include "gfx/size.h" 20 #include "gfx/size.h"
21 21
22 class BalloonCollection; 22 class BalloonCollection;
23 class BalloonViewHost; 23 class BalloonViewHost;
24 class GtkThemeProvider;
24 class MenuGtk; 25 class MenuGtk;
25 class NineBox; 26 class NineBox;
26 class NotificationDetails; 27 class NotificationDetails;
27 class NotificationOptionsMenuModel; 28 class NotificationOptionsMenuModel;
28 class NotificationSource; 29 class NotificationSource;
29 class SlideAnimation; 30 class SlideAnimation;
30 31
31 // A balloon view is the UI component for desktop notification toasts. 32 // A balloon view is the UI component for desktop notification toasts.
32 // It draws a border, and within the border an HTML renderer. 33 // It draws a border, and within the border an HTML renderer.
33 class BalloonViewImpl : public BalloonView, 34 class BalloonViewImpl : public BalloonView,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 reinterpret_cast<BalloonViewImpl*>(user_data)->Close(true); 95 reinterpret_cast<BalloonViewImpl*>(user_data)->Close(true);
95 } 96 }
96 97
97 CHROMEGTK_CALLBACK_1(BalloonViewImpl, gboolean, OnExpose, GdkEventExpose*); 98 CHROMEGTK_CALLBACK_1(BalloonViewImpl, gboolean, OnExpose, GdkEventExpose*);
98 CHROMEGTK_CALLBACK_0(BalloonViewImpl, void, OnOptionsMenuButton); 99 CHROMEGTK_CALLBACK_0(BalloonViewImpl, void, OnOptionsMenuButton);
99 CHROMEGTK_CALLBACK_0(BalloonViewImpl, gboolean, OnDestroy); 100 CHROMEGTK_CALLBACK_0(BalloonViewImpl, gboolean, OnDestroy);
100 101
101 // Non-owned pointer to the balloon which owns this object. 102 // Non-owned pointer to the balloon which owns this object.
102 Balloon* balloon_; 103 Balloon* balloon_;
103 104
105 GtkThemeProvider* theme_provider_;
106
104 // The window that contains the frame of the notification. 107 // The window that contains the frame of the notification.
105 GtkWidget* frame_container_; 108 GtkWidget* frame_container_;
106 109
107 // The widget that contains the shelf. 110 // The widget that contains the shelf.
108 GtkWidget* shelf_; 111 GtkWidget* shelf_;
109 112
110 // The hbox within the shelf that contains the buttons. 113 // The hbox within the shelf that contains the buttons.
111 GtkWidget* hbox_; 114 GtkWidget* hbox_;
112 115
113 // The window that contains the contents of the notification. 116 // The window that contains the contents of the notification.
(...skipping 21 matching lines...) Expand all
135 scoped_ptr<MenuGtk> options_menu_; 138 scoped_ptr<MenuGtk> options_menu_;
136 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_; 139 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_;
137 GtkWidget* options_menu_button_; 140 GtkWidget* options_menu_button_;
138 141
139 NotificationRegistrar notification_registrar_; 142 NotificationRegistrar notification_registrar_;
140 143
141 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl); 144 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl);
142 }; 145 };
143 146
144 #endif // CHROME_BROWSER_GTK_NOTIFICATIONS_BALLOON_VIEW_GTK_H_ 147 #endif // CHROME_BROWSER_GTK_NOTIFICATIONS_BALLOON_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/notifications/balloon_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698