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

Unified Diff: ui/message_center/views/toast_contents_view.h

Issue 2726773003: Reland: Make popup notification active on being clicked (Closed)
Patch Set: Relanded Patch Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | ui/message_center/views/toast_contents_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/toast_contents_view.h
diff --git a/ui/message_center/views/toast_contents_view.h b/ui/message_center/views/toast_contents_view.h
index cb06a4a10eb2b3fb1619e462a391dd037c3b61c5..77a4def3513bab2c10ff7bf6c8378d7c1519ba4d 100644
--- a/ui/message_center/views/toast_contents_view.h
+++ b/ui/message_center/views/toast_contents_view.h
@@ -12,6 +12,7 @@
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
+#include "ui/message_center/message_center_export.h"
#include "ui/message_center/views/message_center_controller.h"
#include "ui/views/widget/widget_delegate.h"
@@ -39,10 +40,13 @@ class PopupAlignmentDelegate;
// which delegates over to MessagePopupCollection, but takes care about
// checking the weakref since MessagePopupCollection may disappear before
// widget/views are closed/destructed.
-class ToastContentsView : public views::WidgetDelegateView,
- public MessageCenterController,
- public gfx::AnimationDelegate {
+class MESSAGE_CENTER_EXPORT ToastContentsView
+ : public views::WidgetDelegateView,
+ public MessageCenterController,
+ public gfx::AnimationDelegate {
public:
+ static const char kViewClassName[];
+
// Computes the size of a toast assuming it will host the given view.
static gfx::Size GetToastSizeForView(const views::View* view);
@@ -69,6 +73,9 @@ class ToastContentsView : public views::WidgetDelegateView,
void SetBoundsWithAnimation(gfx::Rect new_bounds);
+ // Makes the toast activatable, then activate.
+ void ActivateToast();
+
// Origin and bounds are not 'instant', but rather 'current stable values',
// there could be animation in progress that targets these values.
gfx::Point origin() { return origin_; }
@@ -82,6 +89,7 @@ class ToastContentsView : public views::WidgetDelegateView,
void Layout() override;
gfx::Size GetPreferredSize() const override;
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
+ const char* GetClassName() const override;
private:
friend class test::MessagePopupCollectionTest;
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | ui/message_center/views/toast_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698