| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "content/renderer/mouse_lock_dispatcher.h" | 10 #include "content/renderer/mouse_lock_dispatcher.h" |
| 11 | 11 |
| 12 namespace IPC { | 12 namespace IPC { |
| 13 class Message; | 13 class Message; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class RenderWidget; | 18 class RenderWidget; |
| 19 | 19 |
| 20 // RenderWidgetMouseLockDispatcher is owned by RenderWidget. | 20 // RenderWidgetMouseLockDispatcher is owned by RenderWidget. |
| 21 class RenderWidgetMouseLockDispatcher : public MouseLockDispatcher { | 21 class RenderWidgetMouseLockDispatcher : public MouseLockDispatcher { |
| 22 public: | 22 public: |
| 23 explicit RenderWidgetMouseLockDispatcher(RenderWidget* render_widget); | 23 explicit RenderWidgetMouseLockDispatcher(RenderWidget* render_widget); |
| 24 ~RenderWidgetMouseLockDispatcher() override; | 24 ~RenderWidgetMouseLockDispatcher() override; |
| 25 | 25 |
| 26 bool OnMessageReceived(const IPC::Message& message); | 26 bool OnMessageReceived(const IPC::Message& message); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // MouseLockDispatcher implementation. | 29 // MouseLockDispatcher implementation. |
| 30 void SendLockMouseRequest(bool unlocked_by_target) override; | 30 void SendLockMouseRequest() override; |
| 31 void SendUnlockMouseRequest() override; | 31 void SendUnlockMouseRequest() override; |
| 32 | 32 |
| 33 void OnLockMouseACK(bool succeeded); | 33 void OnLockMouseACK(bool succeeded); |
| 34 | 34 |
| 35 RenderWidget* render_widget_; | 35 RenderWidget* render_widget_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(RenderWidgetMouseLockDispatcher); | 37 DISALLOW_COPY_AND_ASSIGN(RenderWidgetMouseLockDispatcher); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace content | 40 } // namespace content |
| 41 | 41 |
| 42 #endif // CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_ | 42 #endif // CONTENT_RENDERER_RENDER_WIDGET_MOUSE_LOCK_DISPATCHER_H_ |
| OLD | NEW |