| Index: components/mus/public/cpp/lib/window.cc
|
| diff --git a/components/mus/public/cpp/lib/window.cc b/components/mus/public/cpp/lib/window.cc
|
| index 4885537b47398550b758905c4da2953ea23171b5..34abc3e308b8c485445f97dcf2c5f546bf356f9f 100644
|
| --- a/components/mus/public/cpp/lib/window.cc
|
| +++ b/components/mus/public/cpp/lib/window.cc
|
| @@ -373,6 +373,18 @@ void Window::SetImeVisibility(bool visible, mojo::TextInputStatePtr state) {
|
| tree_client()->SetImeVisibility(id_, visible, std::move(state));
|
| }
|
|
|
| +void Window::SetCapture() {
|
| + if (connection_)
|
| + tree_client()->SetCapture(this);
|
| + LocalSetCapture(true);
|
| +}
|
| +
|
| +void Window::ReleaseCapture() {
|
| + if (connection_)
|
| + tree_client()->ReleaseCapture(this);
|
| + LocalSetCapture(false);
|
| +}
|
| +
|
| void Window::SetFocus() {
|
| if (connection_ && IsDrawn())
|
| tree_client()->SetFocus(this);
|
| @@ -483,6 +495,7 @@ Window::Window(WindowTreeConnection* connection, Id id)
|
| input_event_handler_(nullptr),
|
| viewport_metrics_(CreateEmptyViewportMetrics()),
|
| visible_(false),
|
| + has_capture_(false),
|
| cursor_id_(mojom::CURSOR_NULL),
|
| drawn_(false) {}
|
|
|
| @@ -589,6 +602,10 @@ void Window::LocalSetBounds(const gfx::Rect& old_bounds,
|
| bounds_ = new_bounds;
|
| }
|
|
|
| +void Window::LocalSetCapture(bool capture) {
|
| + has_capture_ = capture;
|
| +}
|
| +
|
| void Window::LocalSetClientArea(
|
| const gfx::Insets& new_client_area,
|
| const std::vector<gfx::Rect>& additional_client_areas) {
|
|
|