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

Unified Diff: components/mus/ws/test_change_tracker.cc

Issue 1677513002: mus Window Server: implement event capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Implicit Capture Created 4 years, 10 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: components/mus/ws/test_change_tracker.cc
diff --git a/components/mus/ws/test_change_tracker.cc b/components/mus/ws/test_change_tracker.cc
index 6a7100c8e92d114254f5be37146009aac05a7200..8416f9594909de6203005b952b3b2a98d21d4d4a 100644
--- a/components/mus/ws/test_change_tracker.cc
+++ b/components/mus/ws/test_change_tracker.cc
@@ -47,6 +47,10 @@ std::string ChangeToDescription1(const Change& change) {
return base::StringPrintf("OnUnembed window=%s",
WindowIdToString(change.window_id).c_str());
+ case CHANGE_TYPE_LOST_CAPTURE:
+ return base::StringPrintf("OnLostCapture window=%s",
+ WindowIdToString(change.window_id).c_str());
+
case CHANGE_TYPE_NODE_ADD_TRANSIENT_WINDOW:
return base::StringPrintf("AddTransientWindow parent = %s child = %s",
WindowIdToString(change.window_id).c_str(),
@@ -258,6 +262,13 @@ void TestChangeTracker::OnTransientWindowRemoved(Id window_id,
AddChange(change);
}
+void TestChangeTracker::OnLostCapture(Id window_id) {
+ Change change;
+ change.type = CHANGE_TYPE_LOST_CAPTURE;
+ change.window_id = window_id;
+ AddChange(change);
+}
+
void TestChangeTracker::OnWindowViewportMetricsChanged(
mojom::ViewportMetricsPtr old_metrics,
mojom::ViewportMetricsPtr new_metrics) {

Powered by Google App Engine
This is Rietveld 408576698