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

Unified Diff: chrome/browser/tab_contents/tab_contents_view.h

Issue 149466: Fix a crash that happens if a tab is closed while (Closed)
Patch Set: add comment to member var Created 11 years, 5 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') | chrome/browser/tab_contents/web_drag_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view.h
diff --git a/chrome/browser/tab_contents/tab_contents_view.h b/chrome/browser/tab_contents/tab_contents_view.h
index 6acbb302ce7bd981531e8cc75087c5115ab682bc..b8e949b5279be2f7c47f1b8eede9d0c0dfad1281 100644
--- a/chrome/browser/tab_contents/tab_contents_view.h
+++ b/chrome/browser/tab_contents/tab_contents_view.h
@@ -138,6 +138,14 @@ class TabContentsView : public RenderViewHostDelegate::View {
return preferred_width_;
}
+ // If we try to close the tab while a drag is in progress, we crash. These
+ // methods allow the tab contents to determine if a drag is in progress and
+ // postpone the tab closing.
+ virtual bool IsDoingDrag() const {
+ return false;
+ }
+ virtual void CancelDragAndCloseTab() {}
+
protected:
TabContentsView() {} // Abstract interface.
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/tab_contents/web_drag_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698