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

Side by Side Diff: content/browser/renderer_host/render_widget_host_input_event_router.cc

Issue 1496103002: Reusing base::IdType<...> to implement SurfaceId. Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: Rebasing + dusting off... Created 4 years, 10 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
OLDNEW
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 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" 5 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
6 6
7 #include "cc/quads/surface_draw_quad.h" 7 #include "cc/quads/surface_draw_quad.h"
8 #include "cc/surfaces/surface_id_allocator.h" 8 #include "cc/surfaces/surface_id_allocator.h"
9 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
10 #include "content/browser/renderer_host/render_widget_host_view_base.h" 10 #include "content/browser/renderer_host/render_widget_host_view_base.h"
11 #include "content/common/frame_messages.h" 11 #include "content/common/frame_messages.h"
12 #include "third_party/WebKit/public/web/WebInputEvent.h" 12 #include "third_party/WebKit/public/web/WebInputEvent.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 RenderWidgetHostInputEventRouter::HittestDelegate::HittestDelegate( 16 RenderWidgetHostInputEventRouter::HittestDelegate::HittestDelegate(
17 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>& 17 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceId::Hasher>&
18 hittest_data) 18 hittest_data)
19 : hittest_data_(hittest_data) {} 19 : hittest_data_(hittest_data) {}
20 20
21 bool RenderWidgetHostInputEventRouter::HittestDelegate::RejectHitTarget( 21 bool RenderWidgetHostInputEventRouter::HittestDelegate::RejectHitTarget(
22 const cc::SurfaceDrawQuad* surface_quad, 22 const cc::SurfaceDrawQuad* surface_quad,
23 const gfx::Point& point_in_quad_space) { 23 const gfx::Point& point_in_quad_space) {
24 auto it = hittest_data_.find(surface_quad->surface_id); 24 auto it = hittest_data_.find(surface_quad->surface_id);
25 if (it != hittest_data_.end() && it->second.ignored_for_hittest) 25 if (it != hittest_data_.end() && it->second.ignored_for_hittest)
26 return true; 26 return true;
27 return false; 27 return false;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (owner_map_.find(cc::SurfaceIdAllocator::NamespaceForId( 169 if (owner_map_.find(cc::SurfaceIdAllocator::NamespaceForId(
170 params.surface_id)) == owner_map_.end()) { 170 params.surface_id)) == owner_map_.end()) {
171 return; 171 return;
172 } 172 }
173 HittestData data; 173 HittestData data;
174 data.ignored_for_hittest = params.ignored_for_hittest; 174 data.ignored_for_hittest = params.ignored_for_hittest;
175 hittest_data_[params.surface_id] = data; 175 hittest_data_[params.surface_id] = data;
176 } 176 }
177 177
178 } // namespace content 178 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_input_event_router.h ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698