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

Unified Diff: mojo/services/view_manager/connection_manager.cc

Issue 557573002: Changes view manager to report visibility and drawn state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 6 years, 3 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 | « mojo/services/view_manager/connection_manager.h ('k') | mojo/services/view_manager/server_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/connection_manager.cc
diff --git a/mojo/services/view_manager/connection_manager.cc b/mojo/services/view_manager/connection_manager.cc
index f73660dc3c9e83a5d35c5582e2be70ee6d744f6f..3d390b35a4033455d7a6e3a71074cb8373a958bd 100644
--- a/mojo/services/view_manager/connection_manager.cc
+++ b/mojo/services/view_manager/connection_manager.cc
@@ -161,6 +161,18 @@ void ConnectionManager::ProcessViewBoundsChanged(const ServerView* view,
}
}
+void ConnectionManager::ProcessWillChangeViewHierarchy(
+ const ServerView* view,
+ const ServerView* new_parent,
+ const ServerView* old_parent) {
+ for (ConnectionMap::iterator i = connection_map_.begin();
+ i != connection_map_.end();
+ ++i) {
+ i->second->ProcessWillChangeViewHierarchy(
+ view, new_parent, old_parent, IsChangeSource(i->first));
+ }
+}
+
void ConnectionManager::ProcessViewHierarchyChanged(
const ServerView* view,
const ServerView* new_parent,
@@ -238,6 +250,14 @@ void ConnectionManager::OnViewDestroyed(const ServerView* view) {
ProcessViewDeleted(view->id());
}
+void ConnectionManager::OnWillChangeViewHierarchy(
+ const ServerView* view,
+ const ServerView* new_parent,
+ const ServerView* old_parent) {
+ if (!display_manager_.in_setup())
+ ProcessWillChangeViewHierarchy(view, new_parent, old_parent);
+}
+
void ConnectionManager::OnViewHierarchyChanged(const ServerView* view,
const ServerView* new_parent,
const ServerView* old_parent) {
@@ -261,5 +281,13 @@ void ConnectionManager::OnViewBitmapChanged(const ServerView* view) {
display_manager_.SchedulePaint(view, gfx::Rect(view->bounds().size()));
}
+void ConnectionManager::OnWillChangeViewVisibility(const ServerView* view) {
+ for (ConnectionMap::iterator i = connection_map_.begin();
+ i != connection_map_.end();
+ ++i) {
+ i->second->ProcessWillChangeViewVisibility(view, IsChangeSource(i->first));
+ }
+}
+
} // namespace service
} // namespace mojo
« no previous file with comments | « mojo/services/view_manager/connection_manager.h ('k') | mojo/services/view_manager/server_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698