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

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

Issue 362013: [Mac] Delay TabContents::Close() when event-tracking. (Closed)
Patch Set: Oops, included file moved. Created 11 years, 1 month 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/tab_contents_view_mac.h » ('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 db5fff86c94c851a96330cebb6dbff55fca2e511..79bee6dd6da65b77673bd2bab9f734f993b469ca 100644
--- a/chrome/browser/tab_contents/tab_contents_view.h
+++ b/chrome/browser/tab_contents/tab_contents_view.h
@@ -136,6 +136,16 @@ class TabContentsView : public RenderViewHostDelegate::View {
}
virtual void CancelDragAndCloseTab() {}
+ // If we close the tab while a UI control is in an event-tracking
+ // loop, the control may message freed objects and crash.
+ // TabContents::Close() calls IsEventTracking(), and if it returns
+ // true CloseTabAfterEventTracking() is called and the close is not
+ // completed.
+ virtual bool IsEventTracking() const {
+ return false;
+ }
+ virtual void CloseTabAfterEventTracking() {}
+
protected:
TabContentsView() {} // Abstract interface.
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/tab_contents/tab_contents_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698