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

Unified Diff: content/renderer/render_widget_mouse_lock_dispatcher.h

Issue 1980133002: Implement pointer lock API for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/render_widget_mouse_lock_dispatcher.h
diff --git a/content/renderer/render_widget_mouse_lock_dispatcher.h b/content/renderer/render_widget_mouse_lock_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..7f7f5d8cadf434e800cfb061f3e00b2c5bede1eb
--- /dev/null
+++ b/content/renderer/render_widget_mouse_lock_dispatcher.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_
+#define CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "content/renderer/mouse_lock_dispatcher.h"
+
+namespace IPC {
+class Message;
+}
+
+namespace content {
+
+class RenderWidget;
+
+// RenderViewMouseLockDispatcher is owned by RenderViewImpl.
dcheng 2016/06/04 05:28:56 This comment needs to be updated, I think.
lfg 2016/06/06 20:09:43 Done.
+class RenderWidgetMouseLockDispatcher : public MouseLockDispatcher {
+ public:
+ explicit RenderWidgetMouseLockDispatcher(RenderWidget* render_widget);
+ ~RenderWidgetMouseLockDispatcher() override;
+
+ bool OnMessageReceived(const IPC::Message& message);
+
+ private:
+ // MouseLockDispatcher implementation.
+ void SendLockMouseRequest(bool unlocked_by_target) override;
+ void SendUnlockMouseRequest() override;
+
+ void OnLockMouseACK(bool succeeded);
+
+ RenderWidget* render_widget_;
+
+ DISALLOW_COPY_AND_ASSIGN(RenderWidgetMouseLockDispatcher);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698