Index: components/mus/public/cpp/lib/view_tree_client_impl.cc |
diff --git a/components/mus/public/cpp/lib/view_tree_client_impl.cc b/components/mus/public/cpp/lib/view_tree_client_impl.cc |
index 43a19353c72494b9515bdac7bf988dc550fef84a..cc7a54520a9783771dc6d6d44e104d025d8c9b93 100644 |
--- a/components/mus/public/cpp/lib/view_tree_client_impl.cc |
+++ b/components/mus/public/cpp/lib/view_tree_client_impl.cc |
@@ -144,6 +144,13 @@ void ViewTreeClientImpl::SetBounds(Id view_id, const mojo::Rect& bounds) { |
tree_->SetViewBounds(view_id, bounds.Clone(), ActionCompletedCallback()); |
} |
+void ViewTreeClientImpl::SetCapture(Id view_id) { |
+ // In order for us to get here we had to have exposed a view, which implies we |
+ // got a connection. |
+ DCHECK(tree_); |
+ tree_->SetCapture(view_id, ActionCompletedCallback()); |
+} |
+ |
void ViewTreeClientImpl::SetFocus(Id view_id) { |
// In order for us to get here we had to have exposed a view, which implies we |
// got a connection. |
@@ -295,6 +302,14 @@ void ViewTreeClientImpl::OnUnembed() { |
delete this; |
} |
+void ViewTreeClientImpl::OnLostCapture(Id view_id) { |
+ View* view = GetViewById(view_id); |
+ if (view) { |
+ FOR_EACH_OBSERVER(ViewObserver, *ViewPrivate(view).observers(), |
+ OnViewLostCapture(view)); |
+ } |
+} |
+ |
void ViewTreeClientImpl::OnViewBoundsChanged(Id view_id, |
mojo::RectPtr old_bounds, |
mojo::RectPtr new_bounds) { |