| 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_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/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 webkit_glue::WebThreadImpl* GetWebThread() { return &thread_; } | 43 webkit_glue::WebThreadImpl* GetWebThread() { return &thread_; } |
| 44 | 44 |
| 45 MessageLoop* message_loop() { return thread_.message_loop(); } | 45 MessageLoop* message_loop() { return thread_.message_loop(); } |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // Callback only from the compositor's thread. | 48 // Callback only from the compositor's thread. |
| 49 void RemoveInputHandler(int routing_id); | 49 void RemoveInputHandler(int routing_id); |
| 50 | 50 |
| 51 // Called from the compositor's thread. | 51 // Called from the compositor's thread. |
| 52 void HandleInputEvent(int routing_id, | 52 void HandleInputEvent(int routing_id, |
| 53 int64 input_number, |
| 53 const WebKit::WebInputEvent* input_event); | 54 const WebKit::WebInputEvent* input_event); |
| 54 | 55 |
| 55 // Called from the compositor's thread. | 56 // Called from the compositor's thread. |
| 56 void AddInputHandlerOnCompositorThread( | 57 void AddInputHandlerOnCompositorThread( |
| 57 int routing_id, | 58 int routing_id, |
| 58 int input_handler_id, | 59 int input_handler_id, |
| 59 scoped_refptr<base::MessageLoopProxy> main_loop, | 60 scoped_refptr<base::MessageLoopProxy> main_loop, |
| 60 const base::WeakPtr<RenderViewImpl>& render_view_impl); | 61 const base::WeakPtr<RenderViewImpl>& render_view_impl); |
| 61 | 62 |
| 62 class InputHandlerWrapper; | 63 class InputHandlerWrapper; |
| 63 friend class InputHandlerWrapper; | 64 friend class InputHandlerWrapper; |
| 64 | 65 |
| 65 typedef std::map<int, // routing_id | 66 typedef std::map<int, // routing_id |
| 66 scoped_refptr<InputHandlerWrapper> > InputHandlerMap; | 67 scoped_refptr<InputHandlerWrapper> > InputHandlerMap; |
| 67 InputHandlerMap input_handlers_; | 68 InputHandlerMap input_handlers_; |
| 68 | 69 |
| 69 webkit_glue::WebThreadImpl thread_; | 70 webkit_glue::WebThreadImpl thread_; |
| 70 scoped_refptr<InputEventFilter> filter_; | 71 scoped_refptr<InputEventFilter> filter_; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 } // namespace content | 74 } // namespace content |
| 74 | 75 |
| 75 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_ | 76 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_THREAD_H_ |
| OLD | NEW |