Skip to content

Instantly share code, notes, and snippets.

@pwnall
Created June 23, 2017 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwnall/bca5c74042b3164529020b05fd59631a to your computer and use it in GitHub Desktop.
Save pwnall/bca5c74042b3164529020b05fd59631a to your computer and use it in GitHub Desktop.
renderer side
-> DragMsg_TargetDragLeave (browser -> renderer IPC)
----
-> RenderWidget::OnDragTargetDragLeave
-> WebFrameWidgetBase::dragTargetDragLeave
-> DragController::dragExited
on the browser side, the message is sent by RenderWidgetHostImpl::DragTargetDragLeave, which is referenced at
1. BrowserPluginGuest::OnDragStatusUpdate (plugin embedder?)
2. WebContentsViewAura::OnDragUpdated (windows, linux)
3. WebContentsViewAura::OnDragExited (windows, linux)
4. WebDragDest -draggingExited: -draggingUpdated:view: -performDragOperation:view: (mac)
5. WebContentsViewAndroid::OnDragExited (android)
on the browser side, for aura case WebContentsViewAura::OnDragUpdated is referenced in
1. DragDropController::DragUpdate (in ash)
2. DragDropControllerMus::HandleDragEnterOrOver (in aura/mus)
3. DesktopDragDropClientAuraX11::CompleteXdndPosition (pretty sure this one is Linux only)
-> WebContentsViewAura::OnDragUpdated
-> RenderWidgetHostImpl::DragTargetDragLeave
----
-> DragMsg_TargetDragLeave (browser -> renderer IPC)
browser-side drag leave, web page or PDFium, drag outside file in and out
-> DropTargetWin::DragOver
-> DesktopDropTargetWin::OnDragOver
-> DesktopDropTargetWin::Translate
-> DesktopDropTargetWin::NotifyDragLeave
-> WebContentsViewAura::OnDragUpdated
-> RenderWidgetHostImpl::DragTargetDragLeave
----
-> DragMsg_TargetDragLeave (browser -> renderer IPC)
browser-side drag leave, web page or PDFium, drag URL from omnibar in and out of the content window
->
...
-> DesktopNativeWidgetAura::OnMouseEvent
-> Widget::OnMouseEvent
-> RootView::OnMouseDragged
-> ui::EventDispatcherDelegate::DispatchEvent
-> ui::EventDispatcherDelegate::DispatchEventToTarget
-> ui::EventDispatcher::ProcessEvent
-> ui::EventDispatcher::DispatchEvent
-> ui::EventHandler::OnEvent
-> InkDropHostView::OnMouseEvent
-> View::OnMouseEvent
-> View::ProcessMouseDragged
-> View::DoDrag
-> Widget::RunShellDrag
-> DesktopNativeWidgetAura::RunShellDrag
-> Widget::RunShellDrag
-> DesktopNativeWidgeAura::RunShellDrag
-> views::RunShellDrag
-> DesktopDragDropClientWin::StartDragAndDrop
-> DoDragDrop (windows code?)
-> OleGetPackageClipboardOwner (windows code?)
-> GetObjectFromRotByPath (windows code?)
-> DropTargetWin::DragOver
-> DesktopDropTargetWin::OnDragOver
-> DesktopDropTargetWin::Translate
-> DesktopDropTargetWin::NotifyDragLeave
-> WebContentsViewAura::OnDragUpdated
-> RenderWidgetHostImpl::DragTargetDragLeave
----
-> DragMsg_TargetDragLeave (browser -> renderer IPC)
plugin + browser side, for plugin case
~~~~~~~ merp
-> EventDispatcher::dispatch
-> EventDispatcher::dispatchEventPostProcess
-> HTMLPlugInElement::defaultEventHandler
-> WebPluginContainerImpl::handleEvent
-> WebPluginContainerImpl::handleDragEvent
-> BrowserPlugin::handleDragStatusUpdate
---
-> BrowserPluginHostMsg_DragStatusUpdate (plugin embedder -> browser IPC)
---
-> BrowserPluginGuest::OnDragStatusUpdate
-> RenderWidgetHostImpl::DragTargetDragLeave
----
-> DragMsg_TargetDragLeave (browser -> renderer IPC)
-> DragDropController::DragUpdate (in ash)
-> WebContentsViewAura::OnDragUpdated
-> RenderWidgetHostImpl::DragTargetDragLeave
----
-> DragMsg_TargetDragLeave (browser -> renderer IPC)
Stack trace for handling a mouse event, mostly for curiosity
wWinMain (chrome/app/chrome_exe_main_win.cc)
-> MainDllLoader::Launch
-> ChromeMain (chrome/app/chrome_main.cc)
-> content::ContentMain
-> content::ContentMainRunnerImpl::Run
-> content::RunNamedProcessTypeMain
-> content::BrowserMain (content/browser/browser_main.cc)
-> content::BrowserMainRunnerImpl::Run
-> content::BrowserMainLoop::RunMainMessageLoopParts
-> ChromeBrowserMainParts::MainMessageLoopRun
-> base::RunLoop::Run
-> base::MessageLoop::RunHandler
-> base::MessagePumpWin::Run
-> base::MessagePumpForUI::DoRunLoop (base/message_loop/message_pump_win.cc)
-> base::MessagePumpForUI::ProcessNextWindowsMessage
-> base::MessagePumpForUI::ProcessMessageHelper
-> DispatchMessageW (windows code)
-> base::win::WrappedWindowProc<&gfx::WindowImpl::WndProc> (base/win/wrapped_window_proc.h)
-> gfx::WindowImpl::WndProc (ui/gfx/win/window_impl.cc)
-> HWNDMessageHandler::OnWndProc
-> HWNDMessageHandler::_ProcessWindowMessage (ui/views/win/hwnd_message_handler.h, see BEGIN_SAFE_MSG_MAP_EX)
-> HWNDMessageHandler::OnMouseRange
-> HWNDMessageHandler::HandleMouseEventInternal
-> DesktopWindowTreeHostWin::HandleMouseEvent
-> ui::EventSource::SendEventToProcessor
-> ui::EventSource::DeliverEventToProcessor
-> ui::EventProcessor::OnEventFromSource (ui/events/event_processor.cc)
-> ui::EventDispatcherDelegate::DispatchEvent
-> ui::EventDispatcherDelegate::DispatchEventToTarget
-> ui::EventDispatcher::ProcessEvent
-> ui::EventDispatcher::DispatchEvent
-> ui::EventHandler::OnEvent
-> DesktopNativeWidgetAura::OnMouseEvent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment