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

Unified Diff: content/browser/web_contents/web_contents_view_child_frame.cc

Issue 2626073007: Make drag-and-drop work with OOPIF-WebView. (Closed)
Patch Set: Function rename. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_view_child_frame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..17d39e92449c424ff119282f1dd9ef7f2a291cee 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::GetOuterDelegateView() {
+ 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 = GetOuterDelegateView())
+ 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 = GetOuterDelegateView()) {
+ view->StartDragging(
+ drop_data, ops, image, image_offset, event_info, source_rwh);
+ } else {
+ web_contents_->GetOuterWebContents()->SystemDragEnded(source_rwh);
+ }
}
} // namespace content
« no previous file with comments | « content/browser/web_contents/web_contents_view_child_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698