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

Unified Diff: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc

Issue 2779004: Don't allow drop to panels (pop-ups) in ChromeOS. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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 | « chrome/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
index d6fd5dbc6d0d227978a425e8d27ae5098c6f0d67..55f2a32aa789357b68fdfb4ebb851dd938a8186d 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
@@ -189,7 +189,8 @@ RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget(
GDK_POINTER_MOTION_MASK);
// Renderer target DnD.
- drag_dest_.reset(new WebDragDestGtk(tab_contents(), view->native_view()));
+ if (tab_contents()->ShouldAcceptDragAndDrop())
+ drag_dest_.reset(new WebDragDestGtk(tab_contents(), view->native_view()));
gtk_fixed_put(GTK_FIXED(GetNativeView()), view->native_view(), 0, 0);
return view;
@@ -320,7 +321,8 @@ void TabContentsViewGtk::RestoreFocus() {
}
void TabContentsViewGtk::UpdateDragCursor(WebDragOperation operation) {
- drag_dest_->UpdateDragStatus(operation);
+ if (drag_dest_.get())
+ drag_dest_->UpdateDragStatus(operation);
}
void TabContentsViewGtk::GotFocus() {
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698