Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_GPU_COMPOSITOR_THREAD_H_ | 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_ |
| 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_ | 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 explicit CompositorThread(IPC::Channel::Listener* main_listener); | 27 explicit CompositorThread(IPC::Channel::Listener* main_listener); |
| 28 ~CompositorThread(); | 28 ~CompositorThread(); |
| 29 | 29 |
| 30 // This MessageFilter should be added to allow input events to be redirected | 30 // This MessageFilter should be added to allow input events to be redirected |
| 31 // to the compositor's thread. | 31 // to the compositor's thread. |
| 32 IPC::ChannelProxy::MessageFilter* GetMessageFilter() const; | 32 IPC::ChannelProxy::MessageFilter* GetMessageFilter() const; |
| 33 | 33 |
| 34 // Callable from the main thread or the compositor's thread. | 34 // Callable from the main thread or the compositor's thread. |
| 35 void AddCompositor(int routing_id, int compositor_id); | 35 void AddCompositor(int routing_id, int compositor_id); |
| 36 | 36 |
| 37 webkit_glue::WebThreadImpl* GetWebThread() const { return thread_.get(); } | |
|
sky
2011/11/18 23:27:30
nit: according to style guide this should be named
| |
| 38 | |
| 37 private: | 39 private: |
| 38 // Callback only from the compositor's thread. | 40 // Callback only from the compositor's thread. |
| 39 void RemoveCompositor(int routing_id); | 41 void RemoveCompositor(int routing_id); |
| 40 | 42 |
| 41 // Called from the compositor's thread. | 43 // Called from the compositor's thread. |
| 42 void HandleInputEvent(int routing_id, | 44 void HandleInputEvent(int routing_id, |
| 43 const WebKit::WebInputEvent* input_event); | 45 const WebKit::WebInputEvent* input_event); |
| 44 | 46 |
| 45 class CompositorWrapper; | 47 class CompositorWrapper; |
| 46 friend class CompositorWrapper; | 48 friend class CompositorWrapper; |
| 47 | 49 |
| 48 typedef std::map<int, // routing_id | 50 typedef std::map<int, // routing_id |
| 49 linked_ptr<CompositorWrapper> > CompositorMap; | 51 linked_ptr<CompositorWrapper> > CompositorMap; |
| 50 CompositorMap compositors_; | 52 CompositorMap compositors_; |
| 51 | 53 |
| 52 webkit_glue::WebThreadImpl thread_; | 54 webkit_glue::WebThreadImpl thread_; |
| 53 scoped_refptr<InputEventFilter> filter_; | 55 scoped_refptr<InputEventFilter> filter_; |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_ | 58 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_ |
| OLD | NEW |