| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| 11 #include "base/memory/weak_ptr.h" |
| 11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 class WebMouseEvent; | 15 class WebMouseEvent; |
| 15 class WebMouseWheelEvent; | 16 class WebMouseWheelEvent; |
| 16 class WebTouchEvent; | 17 class WebTouchEvent; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| 20 class Point; | 21 class Point; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 48 const ui::LatencyInfo& latency); | 49 const ui::LatencyInfo& latency); |
| 49 | 50 |
| 50 void AddSurfaceIdNamespaceOwner(uint32_t id, RenderWidgetHostViewBase* owner); | 51 void AddSurfaceIdNamespaceOwner(uint32_t id, RenderWidgetHostViewBase* owner); |
| 51 void RemoveSurfaceIdNamespaceOwner(uint32_t id); | 52 void RemoveSurfaceIdNamespaceOwner(uint32_t id); |
| 52 | 53 |
| 53 bool is_registered(uint32_t id) { | 54 bool is_registered(uint32_t id) { |
| 54 return owner_map_.find(id) != owner_map_.end(); | 55 return owner_map_.find(id) != owner_map_.end(); |
| 55 } | 56 } |
| 56 | 57 |
| 57 private: | 58 private: |
| 59 using SurfaceIdNamespaceOwnerMap = |
| 60 base::hash_map<uint32_t, base::WeakPtr<RenderWidgetHostViewBase>>; |
| 61 |
| 58 RenderWidgetHostViewBase* FindEventTarget(RenderWidgetHostViewBase* root_view, | 62 RenderWidgetHostViewBase* FindEventTarget(RenderWidgetHostViewBase* root_view, |
| 59 const gfx::Point& point, | 63 const gfx::Point& point, |
| 60 gfx::Point* transformed_point); | 64 gfx::Point* transformed_point); |
| 61 | 65 |
| 62 typedef base::hash_map<uint32_t, RenderWidgetHostViewBase*> | |
| 63 SurfaceIdNamespaceOwnerMap; | |
| 64 SurfaceIdNamespaceOwnerMap owner_map_; | 66 SurfaceIdNamespaceOwnerMap owner_map_; |
| 65 RenderWidgetHostViewBase* current_touch_target_; | 67 RenderWidgetHostViewBase* current_touch_target_; |
| 66 int active_touches_; | 68 int active_touches_; |
| 67 | 69 |
| 68 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); | 70 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 } // namespace content | 73 } // namespace content |
| 72 | 74 |
| 73 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H
_ | 75 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H
_ |
| OLD | NEW |