summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/notifications/notification_panel.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 23:59:55 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 23:59:55 +0000
commitb253e636b63e9383271fdeb2858f416d59922b57 (patch)
treebdb8de9fcf6ffa25e2b4070e2e2d065be3cf4af4 /chrome/browser/chromeos/notifications/notification_panel.h
parent45a613edf3b4cd4566cf631424217b59c75c146d (diff)
downloadchromium_src-b253e636b63e9383271fdeb2858f416d59922b57.zip
chromium_src-b253e636b63e9383271fdeb2858f416d59922b57.tar.gz
chromium_src-b253e636b63e9383271fdeb2858f416d59922b57.tar.bz2
Hover buttons for notification.
* Chagned WidgetGtk so that any GtkFixed can be parent of WidgetGtk. * Close button and Options menu is moved to separate TYPE_CHILD WidgetGtk which is shown/hidden as mouse moves. TODO: host Widget is not transparent right now. I'll address this in separate CL. BUG=41011 TEST=none Review URL: http://codereview.chromium.org/1654006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/notifications/notification_panel.h')
-rw-r--r--chrome/browser/chromeos/notifications/notification_panel.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/notifications/notification_panel.h b/chrome/browser/chromeos/notifications/notification_panel.h
index c739880..dfc76a5 100644
--- a/chrome/browser/chromeos/notifications/notification_panel.h
+++ b/chrome/browser/chromeos/notifications/notification_panel.h
@@ -93,6 +93,7 @@ class NotificationPanel : public PanelController::Delegate,
virtual void Remove(Balloon* balloon);
virtual void ResizeNotification(Balloon* balloon,
const gfx::Size& size);
+ virtual void SetActiveView(BalloonViewImpl* view);
// PanelController overrides.
virtual string16 GetPanelTitle();
@@ -106,7 +107,7 @@ class NotificationPanel : public PanelController::Delegate,
// Called when a mouse left the panel window.
void OnMouseLeave();
- void OnMouseMotion();
+ void OnMouseMotion(const gfx::Point& point);
NotificationPanelTester* GetTester();
@@ -121,6 +122,9 @@ class NotificationPanel : public PanelController::Delegate,
// Update the Panel Size according to its state.
void UpdatePanel(bool contents_changed);
+ // Update the notification's control view state.
+ void UpdateControl();
+
// Returns the panel's preferred bounds in the screen's coordinates.
// The position will be controlled by window manager so
// the origin is always (0, 0).
@@ -141,17 +145,41 @@ class NotificationPanel : public PanelController::Delegate,
// Mark the given notification as stale.
void MarkStale(const Notification& notification);
+ // Contains all notifications.
BalloonContainer* balloon_container_;
+
+ // The notification panel's widget.
scoped_ptr<views::Widget> panel_widget_;
+
+ // Panel controller for the notification panel.
scoped_ptr<PanelController> panel_controller_;
+
+ // A scrollable parent of the BalloonContainer.
+ // This is owned by the panel so that we can re-attache to the widget
+ // when closing and opening the panel.
scoped_ptr<views::ScrollView> scroll_view_;
+
+ // Panel's state.
State state_;
+
ScopedRunnableMethodFactory<NotificationPanel> task_factory_;
+
+ // The minimum size of a notification.
gfx::Rect min_bounds_;
- scoped_ptr<NotificationPanelTester> tester_;
+
+ // Stale timeout.
int stale_timeout_;
+
+ // A registrar to subscribe PANEL_STATE_CHANGED event.
NotificationRegistrar registrar_;
+ // The notification a mouse pointer is currently on. NULL if the mouse
+ // is out of the panel.
+ BalloonViewImpl* active_;
+
+ // An object that provides interfacce for tests.
+ scoped_ptr<NotificationPanelTester> tester_;
+
DISALLOW_COPY_AND_ASSIGN(NotificationPanel);
};