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

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

Issue 1913433004: Supporting shrinking/enlarging for notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compilation: stl variations Created 4 years, 7 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
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 bd488bea20050adc12f959bbce514e19d42dae50..d69a360e1d939d4de2bc657325a386a934140e28 100644
--- a/ui/message_center/views/toast_contents_view.h
+++ b/ui/message_center/views/toast_contents_view.h
@@ -27,6 +27,10 @@ class View;
namespace message_center {
+namespace test {
+class MessagePopupCollectionTest;
+}
+
class MessagePopupCollection;
class MessageView;
class Notification;
@@ -69,7 +73,7 @@ class ToastContentsView : public views::WidgetDelegateView,
gfx::Point origin() { return origin_; }
gfx::Rect bounds() { return gfx::Rect(origin_, preferred_size_); }
- const std::string& id() { return id_; }
+ const std::string& id() const { return id_; }
// Overridden from views::View:
void OnMouseEntered(const ui::MouseEvent& event) override;
@@ -79,6 +83,8 @@ class ToastContentsView : public views::WidgetDelegateView,
void GetAccessibleState(ui::AXViewState* state) override;
private:
+ friend class test::MessagePopupCollectionTest;
+
// Overridden from MessageCenterController:
void ClickOnNotification(const std::string& notification_id) override;
void RemoveNotification(const std::string& notification_id,
@@ -102,6 +108,9 @@ class ToastContentsView : public views::WidgetDelegateView,
void OnDisplayChanged() override;
void OnWorkAreaChanged() override;
+ // Recalculates preferred size from underlying view and notifies about it.
+ void UpdatePreferredSize();
+
// Initialization and update.
void CreateWidget(gfx::NativeView parent);
« no previous file with comments | « ui/message_center/views/message_popup_collection_unittest.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