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

Side by Side Diff: content/renderer/gpu/compositor_thread.h

Issue 8089002: Input event filtering and compositor thread setup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/gpu/compositor_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_GPU_COMPOSITOR_THREAD_H_
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_
7
8 #include <map>
9
10 #include "base/memory/linked_ptr.h"
11 #include "ipc/ipc_channel_proxy.h"
12 #include "webkit/glue/webthread_impl.h"
13
14 namespace WebKit {
15 class WebInputEvent;
16 }
17
18 class InputEventFilter;
19
20 // The CompositorThread class manages the background thread for the compositor.
21 // The CompositorThread instance can be assumed to outlive the background
22 // thread it manages.
23 class CompositorThread {
24 public:
25 // |main_listener| refers to the central IPC message listener that lives on
26 // the main thread, where all incoming IPC messages are first handled.
27 explicit CompositorThread(IPC::Channel::Listener* main_listener);
28 ~CompositorThread();
29
30 // This MessageFilter should be added to allow input events to be redirected
31 // to the compositor's thread.
32 IPC::ChannelProxy::MessageFilter* GetMessageFilter() const;
33
34 // Callable from the main thread or the compositor's thread.
35 void AddCompositor(int routing_id, int compositor_id);
36
37 private:
38 // Callback only from the compositor's thread.
39 void RemoveCompositor(int routing_id);
40
41 // Called from the compositor's thread.
42 void HandleInputEvent(int routing_id,
43 const WebKit::WebInputEvent* input_event);
44
45 class CompositorWrapper;
46 friend class CompositorWrapper;
47
48 typedef std::map<int, // routing_id
49 linked_ptr<CompositorWrapper> > CompositorMap;
50 CompositorMap compositors_;
51
52 webkit_glue::WebThreadImpl thread_;
53 scoped_refptr<InputEventFilter> filter_;
54 };
55
56 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/gpu/compositor_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698