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

Unified Diff: chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc

Issue 8430013: Split Mac WebDropTarget into two, content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes Created 9 years, 2 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
Index: chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
diff --git a/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc b/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
index dfbe1da268ec04aefb45f047843730ac4eeb8465..91b05d151649edf4b5529493a6419ad03f8ccbf0 100644
--- a/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
+++ b/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
@@ -25,6 +25,7 @@ void WebDragBookmarkHandlerGtk::DragInitialize(TabContents* contents) {
// the constructor. We cannot do that as the WebDragDestGtk object is
// created during the construction of the TabContents object. The
// TabContentsWrapper is created much later.
+ DCHECK(tab_ ? (tab_->tab_contents() == contents) : true);
if (!tab_)
tab_ = TabContentsWrapper::GetCurrentWrapperForContents(contents);
}
@@ -54,17 +55,19 @@ void WebDragBookmarkHandlerGtk::OnReceiveProcessedData(const GURL& url,
}
void WebDragBookmarkHandlerGtk::OnDragOver() {
- if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate())
+ if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDragOver(
bookmark_drag_data_);
+ }
}
void WebDragBookmarkHandlerGtk::OnDragEnter() {
// This is non-null if tab_contents_ is showing an ExtensionWebUI with
// support for (at the moment experimental) drag and drop extensions.
- if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate())
+ if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDragEnter(
bookmark_drag_data_);
+ }
}
void WebDragBookmarkHandlerGtk::OnDrop() {
@@ -85,7 +88,8 @@ void WebDragBookmarkHandlerGtk::OnDrop() {
}
void WebDragBookmarkHandlerGtk::OnDragLeave() {
- if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate())
+ if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDragLeave(
bookmark_drag_data_);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698