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_VIEW_MOUSE_LOCK_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/public/renderer/render_view_observer.h" | 10 #include "content/public/renderer/render_view_observer.h" |
11 #include "content/renderer/mouse_lock_dispatcher.h" | 11 #include "content/renderer/mouse_lock_dispatcher.h" |
12 | 12 |
| 13 namespace content { |
13 class RenderViewImpl; | 14 class RenderViewImpl; |
14 | 15 |
15 // RenderViewMouseLockDispatcher is owned by RenderViewImpl. | 16 // RenderViewMouseLockDispatcher is owned by RenderViewImpl. |
16 class RenderViewMouseLockDispatcher : public MouseLockDispatcher, | 17 class RenderViewMouseLockDispatcher : public MouseLockDispatcher, |
17 public content::RenderViewObserver { | 18 public RenderViewObserver { |
18 public: | 19 public: |
19 explicit RenderViewMouseLockDispatcher(RenderViewImpl* render_view_impl); | 20 explicit RenderViewMouseLockDispatcher(RenderViewImpl* render_view_impl); |
20 virtual ~RenderViewMouseLockDispatcher(); | 21 virtual ~RenderViewMouseLockDispatcher(); |
21 | 22 |
22 private: | 23 private: |
23 // MouseLockDispatcher implementation. | 24 // MouseLockDispatcher implementation. |
24 virtual void SendLockMouseRequest(bool unlocked_by_target) OVERRIDE; | 25 virtual void SendLockMouseRequest(bool unlocked_by_target) OVERRIDE; |
25 virtual void SendUnlockMouseRequest() OVERRIDE; | 26 virtual void SendUnlockMouseRequest() OVERRIDE; |
26 | 27 |
27 // RenderView::Observer implementation. | 28 // RenderView::Observer implementation. |
28 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
29 | 30 |
30 void OnMsgLockMouseACK(bool succeeded); | 31 void OnMsgLockMouseACK(bool succeeded); |
31 | 32 |
32 RenderViewImpl* render_view_impl_; | 33 RenderViewImpl* render_view_impl_; |
33 | 34 |
34 DISALLOW_COPY_AND_ASSIGN(RenderViewMouseLockDispatcher); | 35 DISALLOW_COPY_AND_ASSIGN(RenderViewMouseLockDispatcher); |
35 }; | 36 }; |
36 | 37 |
| 38 } // namespace content |
| 39 |
37 #endif // CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_ | 40 #endif // CONTENT_RENDERER_RENDER_VIEW_MOUSE_LOCK_DISPATCHER_H_ |
OLD | NEW |