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

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

Issue 1352043005: mus: Implement Window Server Capture Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added capture unit tests Created 5 years, 1 month 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/window.cc
diff --git a/components/mus/public/cpp/lib/window.cc b/components/mus/public/cpp/lib/window.cc
index 5258d7cbb560319a4c61f64d8c9d53ef79f2233b..e6c86d33a378098947389550bd0bf95851bc8436 100644
--- a/components/mus/public/cpp/lib/window.cc
+++ b/components/mus/public/cpp/lib/window.cc
@@ -377,6 +377,16 @@ void Window::SetResizeBehavior(mojom::ResizeBehavior resize_behavior) {
->SetResizeBehavior(id_, resize_behavior);
}
+void Window::SetCapture() {
+ if (connection_)
sky 2015/11/17 01:06:41 We should track capture locally too.
+ static_cast<WindowTreeClientImpl*>(connection_)->SetCapture(this);
+}
+
+void Window::ReleaseCapture() {
+ if (connection_)
+ static_cast<WindowTreeClientImpl*>(connection_)->ReleaseCapture(this);
+}
+
void Window::SetFocus() {
if (connection_)
static_cast<WindowTreeClientImpl*>(connection_)->SetFocus(id_);

Powered by Google App Engine
This is Rietveld 408576698