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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "content/public/renderer/render_view_observer.h"
11 #include "content/renderer/mouse_lock_dispatcher.h"
16 // RenderViewMouseLockDispatcher is owned by RenderViewImpl.
17 class RenderViewMouseLockDispatcher
: public MouseLockDispatcher
,
18 public RenderViewObserver
{
20 explicit RenderViewMouseLockDispatcher(RenderViewImpl
* render_view_impl
);
21 ~RenderViewMouseLockDispatcher() override
;
24 // MouseLockDispatcher implementation.
25 void SendLockMouseRequest(bool unlocked_by_target
) override
;
26 void SendUnlockMouseRequest() override
;
28 // RenderView::Observer implementation.
29 bool OnMessageReceived(const IPC::Message
& message
) override
;
31 void OnLockMouseACK(bool succeeded
);
33 RenderViewImpl
* render_view_impl_
;
35 DISALLOW_COPY_AND_ASSIGN(RenderViewMouseLockDispatcher
);
38 } // namespace content
40 #endif // CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_