Chromium Code Reviews| Index: content/browser/web_contents/web_contents_view_child_frame.cc |
| diff --git a/content/browser/web_contents/web_contents_view_child_frame.cc b/content/browser/web_contents/web_contents_view_child_frame.cc |
| index 9b17012781b3864279b2473a25ca08ae97a6c877..53cd3633912e2600e1791a1c9624e014737b694c 100644 |
| --- a/content/browser/web_contents/web_contents_view_child_frame.cc |
| +++ b/content/browser/web_contents/web_contents_view_child_frame.cc |
| @@ -35,6 +35,13 @@ const WebContentsView* WebContentsViewChildFrame::GetOuterView() const { |
| return web_contents_->GetOuterWebContents()->GetView(); |
| } |
| +RenderViewHostDelegateView* WebContentsViewChildFrame::GetOuterRVHDV() { |
| + RenderViewHostImpl* outer_rvh = static_cast<RenderViewHostImpl*>( |
| + web_contents_->GetOuterWebContents()->GetRenderViewHost()); |
| + CHECK(outer_rvh); |
| + return outer_rvh->GetDelegate()->GetDelegateView(); |
| +} |
| + |
| gfx::NativeView WebContentsViewChildFrame::GetNativeView() const { |
| return GetOuterView()->GetNativeView(); |
| } |
| @@ -144,7 +151,8 @@ DropData* WebContentsViewChildFrame::GetDropData() const { |
| } |
| void WebContentsViewChildFrame::UpdateDragCursor(WebDragOperation operation) { |
| - NOTREACHED(); |
| + if (auto view = GetOuterRVHDV()) |
| + view->UpdateDragCursor(operation); |
| } |
| void WebContentsViewChildFrame::GotFocus() { |
| @@ -169,7 +177,12 @@ void WebContentsViewChildFrame::StartDragging( |
| const gfx::Vector2d& image_offset, |
| const DragEventSourceInfo& event_info, |
| RenderWidgetHostImpl* source_rwh) { |
| - NOTREACHED(); |
| + if (auto view = GetOuterRVHDV()) { |
| + view->StartDragging( |
| + drop_data, ops, image, image_offset, event_info, source_rwh); |
| + } else { |
|
ncarter (slow)
2017/01/18 19:16:35
Under what circumstances do we need this 'else' ca
paulmeyer
2017/01/18 20:08:23
I'm not sure exactly when this can happen, but thi
|
| + web_contents_->GetOuterWebContents()->SystemDragEnded(source_rwh); |
| + } |
| } |
| } // namespace content |