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

Unified Diff: components/exo/notification_surface.cc

Issue 2169513003: exo: Add notification surface to manager after commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « components/exo/notification_surface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/notification_surface.cc
diff --git a/components/exo/notification_surface.cc b/components/exo/notification_surface.cc
index cb41a194dc8d1a515a5da46dfcbd6a6f9d39a3c0..aa741e96450485050ebf2ef866d20d53f71a8807 100644
--- a/components/exo/notification_surface.cc
+++ b/components/exo/notification_surface.cc
@@ -88,8 +88,6 @@ NotificationSurface::NotificationSurface(NotificationSurfaceManager* manager,
// TODO(xiyuan): Fix after Surface no longer has an auar::Window.
reveman 2016/07/20 18:58:02 nit: aura::Window
xiyuan 2016/07/20 23:19:03 Done.
window_->AddChild(surface_->window());
surface_->window()->Show();
-
- manager_->AddSurface(this);
}
NotificationSurface::~NotificationSurface() {
@@ -113,6 +111,11 @@ void NotificationSurface::OnSurfaceCommit() {
bounds.set_size(surface_->content_size());
window_->SetBounds(bounds);
reveman 2016/07/20 18:58:02 as the bounds can change here, doesn't the manager
xiyuan 2016/07/20 19:52:41 The hosting ArcCustomNotificationView is based on
reveman 2016/07/20 20:57:30 I'm not suggesting we should show it unless bounds
xiyuan 2016/07/20 22:01:20 I prefer not doing remove-then-add on bounds chang
}
+
+ if (!added_to_manager_) {
+ added_to_manager_ = true;
+ manager_->AddSurface(this);
+ }
}
bool NotificationSurface::IsSurfaceSynchronized() const {
« no previous file with comments | « components/exo/notification_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698