| Index: components/mus/public/cpp/lib/window_tree_client_impl.cc
|
| diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
|
| index f243d63713c7fff59ab9b105ee53cf551b7c15f8..775f8954692b3802a5128c5ff6c6fddeb8e458e8 100644
|
| --- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
|
| +++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
|
| @@ -216,6 +216,24 @@ void WindowTreeClientImpl::SetBounds(Window* window,
|
| tree_->SetWindowBounds(change_id, window->id(), mojo::Rect::From(bounds));
|
| }
|
|
|
| +void WindowTreeClientImpl::SetCapture(Window* window) {
|
| + // In order for us to get here we had to have exposed a window, which implies
|
| + // we got a connection.
|
| + DCHECK(tree_);
|
| + const uint32_t change_id = ScheduleInFlightChange(make_scoped_ptr(
|
| + new CrashInFlightChange(window, ChangeType::SET_CAPTURE)));
|
| + tree_->SetCapture(change_id, window->id());
|
| +}
|
| +
|
| +void WindowTreeClientImpl::ReleaseCapture(Window* window) {
|
| + // In order for us to get here we had to have exposed a window, which implies
|
| + // we got a connection.
|
| + DCHECK(tree_);
|
| + const uint32_t change_id = ScheduleInFlightChange(make_scoped_ptr(
|
| + new CrashInFlightChange(window, ChangeType::RELEASE_CAPTURE)));
|
| + tree_->ReleaseCapture(change_id, window->id());
|
| +}
|
| +
|
| void WindowTreeClientImpl::SetClientArea(
|
| Id window_id,
|
| const gfx::Insets& client_area,
|
| @@ -523,6 +541,14 @@ void WindowTreeClientImpl::OnUnembed(Id window_id) {
|
| WindowPrivate(window).LocalDestroy();
|
| }
|
|
|
| +void WindowTreeClientImpl::OnLostCapture(Id window_id) {
|
| + Window* window = GetWindowById(window_id);
|
| + if (window) {
|
| + FOR_EACH_OBSERVER(WindowObserver, *WindowPrivate(window).observers(),
|
| + OnWindowLostCapture(window));
|
| + }
|
| +}
|
| +
|
| void WindowTreeClientImpl::OnTopLevelCreated(uint32_t change_id,
|
| mojom::WindowDataPtr data) {
|
| // The server ack'd the top level window we created and supplied the state
|
|
|