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

Unified Diff: ui/arc/notification/arc_custom_notification_view.h

Issue 2192023002: arc: Support custom notification size change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-notification-size
Patch Set: Created 4 years, 5 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/DEPS ('k') | ui/arc/notification/arc_custom_notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_custom_notification_view.h
diff --git a/ui/arc/notification/arc_custom_notification_view.h b/ui/arc/notification/arc_custom_notification_view.h
index 6c25b720f4372a31f463015dec24367839672f60..c10f3a2310a776e79e81af00f21b0890dfc0a6f1 100644
--- a/ui/arc/notification/arc_custom_notification_view.h
+++ b/ui/arc/notification/arc_custom_notification_view.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "ui/arc/notification/arc_custom_notification_item.h"
+#include "ui/aura/window_observer.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/native/native_view_host.h"
@@ -26,6 +27,7 @@ namespace arc {
class ArcCustomNotificationView : public views::NativeViewHost,
public views::ButtonListener,
+ public aura::WindowObserver,
public ArcCustomNotificationItem::Observer {
public:
ArcCustomNotificationView(ArcCustomNotificationItem* item,
@@ -34,6 +36,7 @@ class ArcCustomNotificationView : public views::NativeViewHost,
private:
void CreateFloatingCloseButton();
+ void UpdatePreferredSize();
// views::NativeViewHost
void ViewHierarchyChanged(
@@ -43,6 +46,12 @@ class ArcCustomNotificationView : public views::NativeViewHost,
// views::ButtonListener
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+ // aura::WindowObserver
+ void OnWindowBoundsChanged(aura::Window* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+ void OnWindowDestroying(aura::Window* window) override;
+
// ArcCustomNotificationItem::Observer
void OnItemDestroying() override;
void OnItemPinnedChanged() override;
« no previous file with comments | « ui/arc/notification/DEPS ('k') | ui/arc/notification/arc_custom_notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698