| Index: components/mus/view_tree_impl.cc
|
| diff --git a/components/mus/view_tree_impl.cc b/components/mus/view_tree_impl.cc
|
| index b97583e1fbf1b804651bc5491cd63a145e011539..08f109770d064bd444e859945ce7a747805b46d3 100644
|
| --- a/components/mus/view_tree_impl.cc
|
| +++ b/components/mus/view_tree_impl.cc
|
| @@ -318,6 +318,10 @@ void ViewTreeImpl::ProcessFocusChanged(const ServerView* old_focused_view,
|
| : ViewIdToTransportId(ViewId()));
|
| }
|
|
|
| +void ViewTreeImpl::ProcessLostCapture(const ServerView* old_captured_view) {
|
| + client()->OnLostCapture(ViewIdToTransportId(old_captured_view->id()));
|
| +}
|
| +
|
| bool ViewTreeImpl::IsViewKnown(const ServerView* view) const {
|
| return known_views_.count(ViewIdToTransportId(view->id())) > 0;
|
| }
|
| @@ -567,6 +571,18 @@ void ViewTreeImpl::GetViewTree(
|
| callback.Run(ViewsToViewDatas(views));
|
| }
|
|
|
| +void ViewTreeImpl::SetCapture(Id view_id,
|
| + const Callback<void(bool)>& callback) {
|
| + ServerView* view = GetView(ViewIdFromTransportId(view_id));
|
| + bool success = view && access_policy_->CanSetCapture(view);
|
| + if (success) {
|
| + ViewTreeHostImpl* host = GetHost();
|
| + if (host)
|
| + host->SetCapture(view);
|
| + }
|
| + callback.Run(success);
|
| +}
|
| +
|
| void ViewTreeImpl::SetViewBounds(Id view_id,
|
| mojo::RectPtr bounds,
|
| const Callback<void(bool)>& callback) {
|
|
|