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

Unified Diff: chrome/browser/views/tab_contents/tab_contents_view_win.h

Issue 155548: Merge 20436 - Fix a crash that happens if a tab is closed while... (Closed) Base URL: svn://chrome-svn/chrome/branches/193/src/
Patch Set: 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
Index: chrome/browser/views/tab_contents/tab_contents_view_win.h
===================================================================
--- chrome/browser/views/tab_contents/tab_contents_view_win.h (revision 20694)
+++ chrome/browser/views/tab_contents/tab_contents_view_win.h (working copy)
@@ -7,12 +7,14 @@
#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
+#include "base/timer.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "views/widget/widget_win.h"
class RenderViewContextMenuWin;
class SadTabView;
struct WebDropData;
+class WebDragSource;
class WebDropTarget;
// Windows-specific implementation of the TabContentsView. It is a HWND that
@@ -47,6 +49,8 @@
virtual void SetInitialFocus();
virtual void StoreFocus();
virtual void RestoreFocus();
+ virtual bool IsDoingDrag() const;
+ virtual void CancelDragAndCloseTab();
// Backend implementation of RenderViewHostDelegate::View.
virtual void ShowContextMenu(const ContextMenuParams& params);
@@ -60,6 +64,9 @@
virtual views::FocusManager* GetFocusManager();
private:
+ // A helper method for closing the tab.
+ void CloseTab();
+
// Windows events ------------------------------------------------------------
// Overrides from WidgetWin.
@@ -115,6 +122,18 @@
// accessible when unparented.
views::FocusManager* focus_manager_;
+ // |drag_source_| is our callback interface passed to the system when we
+ // want to initiate a drag and drop operation. We use it to tell if a
+ // drag operation is happening.
+ scoped_refptr<WebDragSource> drag_source_;
+
+ // Set to true if we want to close the tab after the system drag operation
+ // has finished.
+ bool close_tab_after_drag_ends_;
+
+ // Used to close the tab after the stack has unwound.
+ base::OneShotTimer<TabContentsViewWin> close_tab_timer_;
+
DISALLOW_COPY_AND_ASSIGN(TabContentsViewWin);
};
Property changes on: chrome\browser\views\tab_contents\tab_contents_view_win.h
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/views/tab_contents/tab_contents_view_win.h:r20436
« no previous file with comments | « chrome/browser/tab_contents/web_drag_source.cc ('k') | chrome/browser/views/tab_contents/tab_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698