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

Unified Diff: content/renderer/mus/compositor_mus_connection.h

Issue 2301353003: Changes ownership of WindowTreeClient (Closed)
Patch Set: Created 4 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: content/renderer/mus/compositor_mus_connection.h
diff --git a/content/renderer/mus/compositor_mus_connection.h b/content/renderer/mus/compositor_mus_connection.h
index 2d477448898d42e0d46ea5486fab50fbe9d7f856..e8ccc029324563fc0e121f0e941012723449d278 100644
--- a/content/renderer/mus/compositor_mus_connection.h
+++ b/content/renderer/mus/compositor_mus_connection.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_
#define CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_
+#include <memory>
+
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
#include "services/ui/public/cpp/input_event_handler.h"
#include "services/ui/public/cpp/window.h"
@@ -72,9 +75,12 @@ class CONTENT_EXPORT CompositorMusConnection
std::unique_ptr<blink::WebInputEvent> Convert(const ui::Event& event);
+ void DeleteWindowTreeClient();
+
// WindowTreeClientDelegate implementation:
- void OnDidDestroyClient(ui::WindowTreeClient* client) override;
void OnEmbed(ui::Window* root) override;
+ void OnEmbedRootDestroyed(ui::Window* root) override;
+ void OnLostConnection(ui::WindowTreeClient* client) override;
void OnPointerEventObserved(const ui::PointerEvent& event,
ui::Window* target) override;
@@ -86,6 +92,8 @@ class CONTENT_EXPORT CompositorMusConnection
ack_callback) override;
const int routing_id_;
+ base::Lock window_tree_client_lock_;
+ std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
ui::Window* root_;
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;

Powered by Google App Engine
This is Rietveld 408576698