| Index: components/mus/ws/window_manager_state.h
|
| diff --git a/components/mus/ws/window_manager_state.h b/components/mus/ws/window_manager_state.h
|
| index d85199b5f4be81f06963dc6299e29f18a8050499..e742c9dc057c299ba8dc7ed66e74e5af44aed0ec 100644
|
| --- a/components/mus/ws/window_manager_state.h
|
| +++ b/components/mus/ws/window_manager_state.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include "base/atomicops.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/timer/timer.h"
|
| @@ -106,6 +107,8 @@ class WindowManagerState : public EventDispatcherDelegate {
|
|
|
| void OnWillDestroyTree(WindowTree* tree);
|
|
|
| + mojo::ScopedSharedBufferHandle GetCursorLocationMemory();
|
| +
|
| private:
|
| class ProcessedEventTarget;
|
| friend class Display;
|
| @@ -159,6 +162,7 @@ class WindowManagerState : public EventDispatcherDelegate {
|
| void SetNativeCapture() override;
|
| void ReleaseNativeCapture() override;
|
| void OnServerWindowCaptureLost(ServerWindow* window) override;
|
| + void OnMouseCursorLocationChanged(const gfx::Point& point) override;
|
| void DispatchInputEventToWindow(ServerWindow* target,
|
| bool in_nonclient_area,
|
| const ui::Event& event,
|
| @@ -188,6 +192,20 @@ class WindowManagerState : public EventDispatcherDelegate {
|
|
|
| EventDispatcher event_dispatcher_;
|
|
|
| + // The current location of the cursor. This is always kept up to date so we
|
| + // can atomically write this to |cursor_location_memory_| once it is created.
|
| + base::subtle::Atomic64 current_cursor_location_;
|
| +
|
| + // A handle to a shared memory buffer that is one 64 bit integer long. We
|
| + // share this with any connection as the same user. This buffer is lazily
|
| + // created on the first access.
|
| + mojo::ScopedSharedBufferHandle cursor_location_handle_;
|
| +
|
| + // The one int64 in |cursor_location_handle_|. When we write to this
|
| + // location, we must always write to it atomically. (On the other side of the
|
| + // mojo connection, this data must be read atomically.)
|
| + base::subtle::Atomic64* cursor_location_memory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WindowManagerState);
|
| };
|
|
|
|
|