Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1677513002: mus Window Server: implement event capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 void WindowTreeClientImpl::SetBounds(Window* window, 237 void WindowTreeClientImpl::SetBounds(Window* window,
238 const gfx::Rect& old_bounds, 238 const gfx::Rect& old_bounds,
239 const gfx::Rect& bounds) { 239 const gfx::Rect& bounds) {
240 DCHECK(tree_); 240 DCHECK(tree_);
241 const uint32_t change_id = ScheduleInFlightChange( 241 const uint32_t change_id = ScheduleInFlightChange(
242 make_scoped_ptr(new InFlightBoundsChange(window, old_bounds))); 242 make_scoped_ptr(new InFlightBoundsChange(window, old_bounds)));
243 tree_->SetWindowBounds(change_id, window->id(), mojo::Rect::From(bounds)); 243 tree_->SetWindowBounds(change_id, window->id(), mojo::Rect::From(bounds));
244 } 244 }
245 245
246 void WindowTreeClientImpl::SetCapture(Window* window) {
247 NOTIMPLEMENTED();
248 }
249
250 void WindowTreeClientImpl::ReleaseCapture(Window* window) {
251 NOTIMPLEMENTED();
252 }
253
246 void WindowTreeClientImpl::SetClientArea( 254 void WindowTreeClientImpl::SetClientArea(
247 Id window_id, 255 Id window_id,
248 const gfx::Insets& client_area, 256 const gfx::Insets& client_area,
249 const std::vector<gfx::Rect>& additional_client_areas) { 257 const std::vector<gfx::Rect>& additional_client_areas) {
250 DCHECK(tree_); 258 DCHECK(tree_);
251 tree_->SetClientArea( 259 tree_->SetClientArea(
252 window_id, mojo::Insets::From(client_area), 260 window_id, mojo::Insets::From(client_area),
253 mojo::Array<mojo::RectPtr>::From(additional_client_areas)); 261 mojo::Array<mojo::RectPtr>::From(additional_client_areas));
254 } 262 }
255 263
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 555
548 void WindowTreeClientImpl::OnUnembed(Id window_id) { 556 void WindowTreeClientImpl::OnUnembed(Id window_id) {
549 Window* window = GetWindowById(window_id); 557 Window* window = GetWindowById(window_id);
550 if (!window) 558 if (!window)
551 return; 559 return;
552 560
553 delegate_->OnUnembed(window); 561 delegate_->OnUnembed(window);
554 WindowPrivate(window).LocalDestroy(); 562 WindowPrivate(window).LocalDestroy();
555 } 563 }
556 564
565 void WindowTreeClientImpl::OnLostCapture(Id window_id) {
566 NOTIMPLEMENTED();
567 }
568
557 void WindowTreeClientImpl::OnTopLevelCreated(uint32_t change_id, 569 void WindowTreeClientImpl::OnTopLevelCreated(uint32_t change_id,
558 mojom::WindowDataPtr data) { 570 mojom::WindowDataPtr data) {
559 // The server ack'd the top level window we created and supplied the state 571 // The server ack'd the top level window we created and supplied the state
560 // of the window at the time the server created it. For properties we do not 572 // of the window at the time the server created it. For properties we do not
561 // have changes in flight for we can update them immediately. For properties 573 // have changes in flight for we can update them immediately. For properties
562 // with changes in flight we set the revert value from the server. 574 // with changes in flight we set the revert value from the server.
563 575
564 scoped_ptr<InFlightChange> change(std::move(in_flight_map_[change_id])); 576 scoped_ptr<InFlightChange> change(std::move(in_flight_map_[change_id]));
565 in_flight_map_.erase(change_id); 577 in_flight_map_.erase(change_id);
566 DCHECK(change); 578 DCHECK(change);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 window->id()); 903 window->id());
892 } 904 }
893 905
894 void WindowTreeClientImpl::SetFrameDecorationValues( 906 void WindowTreeClientImpl::SetFrameDecorationValues(
895 mojom::FrameDecorationValuesPtr values) { 907 mojom::FrameDecorationValuesPtr values) {
896 window_manager_internal_client_->WmSetFrameDecorationValues( 908 window_manager_internal_client_->WmSetFrameDecorationValues(
897 std::move(values)); 909 std::move(values));
898 } 910 }
899 911
900 } // namespace mus 912 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698