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

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2626013005: Change CaptureSynchronizer and PointerWatcherEventRouter to support multiple CaptureClients. (Closed)
Patch Set: separate out changes for removing GetCaptureClient() Created 3 years, 11 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: ui/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index 02cf6376934d0bff1123c9b9149b382b160d6280..36448839c4944057dde9b15522dda0fd9d56d9d7 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -7,6 +7,7 @@
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/drag_drop_client.h"
#include "ui/aura/client/focus_client.h"
@@ -303,6 +304,9 @@ void DesktopWindowTreeHostMus::OnWidgetInitDone() {
// client-area and hit-test-mask.
SendClientAreaToServer();
SendHitTestMaskToServer();
+
+ MusClient::Get()->OnCaptureClientSet(
+ aura::client::GetCaptureClient(window()));
}
std::unique_ptr<corewm::Tooltip> DesktopWindowTreeHostMus::CreateTooltip() {
@@ -332,6 +336,9 @@ void DesktopWindowTreeHostMus::Close() {
}
void DesktopWindowTreeHostMus::CloseNow() {
+ MusClient::Get()->OnCaptureClientUnset(
+ aura::client::GetCaptureClient(window()));
+
native_widget_delegate_->OnNativeWidgetDestroying();
// If we have children, close them. Use a copy for iteration because they'll

Powered by Google App Engine
This is Rietveld 408576698