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

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

Issue 1489913003: Handle pointer-events: none in browser process hittesting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implement piman@'s suggestion Created 4 years, 11 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 (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 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 27 matching lines...) Expand all
38 #include "content/browser/renderer_host/input/input_router_impl.h" 38 #include "content/browser/renderer_host/input/input_router_impl.h"
39 #include "content/browser/renderer_host/input/synthetic_gesture.h" 39 #include "content/browser/renderer_host/input/synthetic_gesture.h"
40 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" 40 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h"
41 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" 41 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
42 #include "content/browser/renderer_host/input/timeout_monitor.h" 42 #include "content/browser/renderer_host/input/timeout_monitor.h"
43 #include "content/browser/renderer_host/input/touch_emulator.h" 43 #include "content/browser/renderer_host/input/touch_emulator.h"
44 #include "content/browser/renderer_host/render_process_host_impl.h" 44 #include "content/browser/renderer_host/render_process_host_impl.h"
45 #include "content/browser/renderer_host/render_view_host_impl.h" 45 #include "content/browser/renderer_host/render_view_host_impl.h"
46 #include "content/browser/renderer_host/render_widget_helper.h" 46 #include "content/browser/renderer_host/render_widget_helper.h"
47 #include "content/browser/renderer_host/render_widget_host_delegate.h" 47 #include "content/browser/renderer_host/render_widget_host_delegate.h"
48 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
48 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" 49 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h"
49 #include "content/browser/renderer_host/render_widget_host_view_base.h" 50 #include "content/browser/renderer_host/render_widget_host_view_base.h"
50 #include "content/common/content_constants_internal.h" 51 #include "content/common/content_constants_internal.h"
51 #include "content/common/content_switches_internal.h" 52 #include "content/common/content_switches_internal.h"
52 #include "content/common/cursors/webcursor.h" 53 #include "content/common/cursors/webcursor.h"
53 #include "content/common/frame_messages.h" 54 #include "content/common/frame_messages.h"
54 #include "content/common/gpu/gpu_messages.h" 55 #include "content/common/gpu/gpu_messages.h"
55 #include "content/common/host_shared_bitmap_manager.h" 56 #include "content/common/host_shared_bitmap_manager.h"
56 #include "content/common/input_messages.h" 57 #include "content/common/input_messages.h"
57 #include "content/common/view_messages.h" 58 #include "content/common/view_messages.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 return is_loading_; 437 return is_loading_;
437 } 438 }
438 439
439 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { 440 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
440 if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg)) 441 if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg))
441 return true; 442 return true;
442 443
443 bool handled = true; 444 bool handled = true;
444 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg) 445 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg)
445 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone) 446 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone)
447 IPC_MESSAGE_HANDLER(FrameHostMsg_HittestData, OnHittestData)
446 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, 448 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture,
447 OnQueueSyntheticGesture) 449 OnQueueSyntheticGesture)
448 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, 450 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition,
449 OnImeCancelComposition) 451 OnImeCancelComposition)
450 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) 452 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose)
451 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, 453 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK,
452 OnUpdateScreenRectsAck) 454 OnUpdateScreenRectsAck)
453 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) 455 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove)
454 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) 456 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText)
455 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, 457 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame,
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 if (!owned_by_render_frame_host_) { 1499 if (!owned_by_render_frame_host_) {
1498 // TODO(evanm): This synchronously ends up calling "delete this". 1500 // TODO(evanm): This synchronously ends up calling "delete this".
1499 // Is that really what we want in response to this message? I'm matching 1501 // Is that really what we want in response to this message? I'm matching
1500 // previous behavior of the code here. 1502 // previous behavior of the code here.
1501 Destroy(true); 1503 Destroy(true);
1502 } else { 1504 } else {
1503 RendererExited(static_cast<base::TerminationStatus>(status), exit_code); 1505 RendererExited(static_cast<base::TerminationStatus>(status), exit_code);
1504 } 1506 }
1505 } 1507 }
1506 1508
1509 void RenderWidgetHostImpl::OnHittestData(
1510 const FrameHostMsg_HittestData_Params& params) {
1511 if (delegate_)
1512 delegate_->GetInputEventRouter()->OnHittestData(params);
1513 }
1514
1507 void RenderWidgetHostImpl::OnClose() { 1515 void RenderWidgetHostImpl::OnClose() {
1508 ShutdownAndDestroyWidget(true); 1516 ShutdownAndDestroyWidget(true);
1509 } 1517 }
1510 1518
1511 void RenderWidgetHostImpl::OnSetTooltipText( 1519 void RenderWidgetHostImpl::OnSetTooltipText(
1512 const base::string16& tooltip_text, 1520 const base::string16& tooltip_text,
1513 WebTextDirection text_direction_hint) { 1521 WebTextDirection text_direction_hint) {
1514 // First, add directionality marks around tooltip text if necessary. 1522 // First, add directionality marks around tooltip text if necessary.
1515 // A naive solution would be to simply always wrap the text. However, on 1523 // A naive solution would be to simply always wrap the text. However, on
1516 // windows, Unicode directional embedding characters can't be displayed on 1524 // windows, Unicode directional embedding characters can't be displayed on
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 } 2249 }
2242 2250
2243 #if defined(OS_WIN) 2251 #if defined(OS_WIN)
2244 gfx::NativeViewAccessible 2252 gfx::NativeViewAccessible
2245 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2253 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2246 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2254 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2247 } 2255 }
2248 #endif 2256 #endif
2249 2257
2250 } // namespace content 2258 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698