| 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 3ba759b249c617d7027e36ed13f2cc220f5427c9..6972c9bc01bd22c73649e33277bdfafcfedd0a12 100644
|
| --- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
|
| +++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
|
| @@ -220,6 +220,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,
|
| @@ -527,6 +545,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
|
|
|