blob: 4e16c5797a4d66d43f3ca85d5586956ac70c3f31 [file] [log] [blame]
[email protected]89054502012-06-03 10:29:241// 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.
4
5#ifndef CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_
6#define CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_
[email protected]89054502012-06-03 10:29:247
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"
12
[email protected]e9ff79c2012-10-19 21:31:2613namespace content {
[email protected]89054502012-06-03 10:29:2414class RenderViewImpl;
15
16// RenderViewMouseLockDispatcher is owned by RenderViewImpl.
17class RenderViewMouseLockDispatcher : public MouseLockDispatcher,
[email protected]e9ff79c2012-10-19 21:31:2618 public RenderViewObserver {
[email protected]89054502012-06-03 10:29:2419 public:
20 explicit RenderViewMouseLockDispatcher(RenderViewImpl* render_view_impl);
21 virtual ~RenderViewMouseLockDispatcher();
22
23 private:
24 // MouseLockDispatcher implementation.
25 virtual void SendLockMouseRequest(bool unlocked_by_target) OVERRIDE;
26 virtual void SendUnlockMouseRequest() OVERRIDE;
27
28 // RenderView::Observer implementation.
29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
30
[email protected]3d9ec5052013-01-02 22:05:2531 void OnLockMouseACK(bool succeeded);
[email protected]89054502012-06-03 10:29:2432
33 RenderViewImpl* render_view_impl_;
34
35 DISALLOW_COPY_AND_ASSIGN(RenderViewMouseLockDispatcher);
36};
37
[email protected]e9ff79c2012-10-19 21:31:2638} // namespace content
39
[email protected]89054502012-06-03 10:29:2440#endif // CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_