| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |