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

Unified Diff: services/ui/ws/test_change_tracker.cc

Issue 2414683003: Mus+Ash: propagate Surface ID to parents (Closed)
Patch Set: Don't follow null surface_info Created 4 years, 2 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 | « services/ui/ws/test_change_tracker.h ('k') | services/ui/ws/test_server_window_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/test_change_tracker.cc
diff --git a/services/ui/ws/test_change_tracker.cc b/services/ui/ws/test_change_tracker.cc
index cf9deb34f2fbe3dbf41619204a5fc24044e3b2d9..c5350be50a6e3534aeb692a22599a91a8bdf7004 100644
--- a/services/ui/ws/test_change_tracker.cc
+++ b/services/ui/ws/test_change_tracker.cc
@@ -142,6 +142,10 @@ std::string ChangeToDescription(const Change& change,
return base::StringPrintf("OpacityChanged window_id=%s opacity=%.2f",
WindowIdToString(change.window_id).c_str(),
change.float_value);
+ case CHANGE_TYPE_SURFACE_CHANGED:
+ return base::StringPrintf("SurfaceCreated window_id=%s surface_id=%s",
+ WindowIdToString(change.window_id).c_str(),
+ change.surface_id.ToString().c_str());
}
return std::string();
}
@@ -421,6 +425,22 @@ void TestChangeTracker::OnTopLevelCreated(uint32_t change_id,
AddChange(change);
}
+void TestChangeTracker::OnWindowSurfaceChanged(
+ Id window_id,
+ const cc::SurfaceId& surface_id,
+ const cc::SurfaceSequence& surface_sequence,
+ const gfx::Size& frame_size,
+ float device_scale_factor) {
+ Change change;
+ change.type = CHANGE_TYPE_SURFACE_CHANGED;
+ change.window_id = window_id;
+ change.surface_id = surface_id;
+ change.surface_sequence = surface_sequence;
+ change.frame_size = frame_size;
+ change.device_scale_factor = device_scale_factor;
+ AddChange(change);
+}
+
void TestChangeTracker::AddChange(const Change& change) {
changes_.push_back(change);
if (delegate_)
« no previous file with comments | « services/ui/ws/test_change_tracker.h ('k') | services/ui/ws/test_server_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698