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

Unified Diff: components/mus/public/cpp/lib/view_tree_client_impl.cc

Issue 1352043005: mus: Implement Window Server Capture Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/mus/public/cpp/lib/view_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/view_tree_client_impl.cc b/components/mus/public/cpp/lib/view_tree_client_impl.cc
index 43a19353c72494b9515bdac7bf988dc550fef84a..cc7a54520a9783771dc6d6d44e104d025d8c9b93 100644
--- a/components/mus/public/cpp/lib/view_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/view_tree_client_impl.cc
@@ -144,6 +144,13 @@ void ViewTreeClientImpl::SetBounds(Id view_id, const mojo::Rect& bounds) {
tree_->SetViewBounds(view_id, bounds.Clone(), ActionCompletedCallback());
}
+void ViewTreeClientImpl::SetCapture(Id view_id) {
+ // In order for us to get here we had to have exposed a view, which implies we
+ // got a connection.
+ DCHECK(tree_);
+ tree_->SetCapture(view_id, ActionCompletedCallback());
+}
+
void ViewTreeClientImpl::SetFocus(Id view_id) {
// In order for us to get here we had to have exposed a view, which implies we
// got a connection.
@@ -295,6 +302,14 @@ void ViewTreeClientImpl::OnUnembed() {
delete this;
}
+void ViewTreeClientImpl::OnLostCapture(Id view_id) {
+ View* view = GetViewById(view_id);
+ if (view) {
+ FOR_EACH_OBSERVER(ViewObserver, *ViewPrivate(view).observers(),
+ OnViewLostCapture(view));
+ }
+}
+
void ViewTreeClientImpl::OnViewBoundsChanged(Id view_id,
mojo::RectPtr old_bounds,
mojo::RectPtr new_bounds) {

Powered by Google App Engine
This is Rietveld 408576698