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

Side by Side Diff: content/public/browser/web_contents_view.h

Issue 10966023: Fix the crash that could occur when the window is closed while web contents drag is in progress. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // first time. 91 // first time.
92 virtual void SetInitialFocus() = 0; 92 virtual void SetInitialFocus() = 0;
93 93
94 // Stores the currently focused view. 94 // Stores the currently focused view.
95 virtual void StoreFocus() = 0; 95 virtual void StoreFocus() = 0;
96 96
97 // Restores focus to the last focus view. If StoreFocus has not yet been 97 // Restores focus to the last focus view. If StoreFocus has not yet been
98 // invoked, SetInitialFocus is invoked. 98 // invoked, SetInitialFocus is invoked.
99 virtual void RestoreFocus() = 0; 99 virtual void RestoreFocus() = 0;
100 100
101 // If we try to close the tab while a drag is in progress, we crash. These
102 // methods allow the WebContents to determine if a drag is in progress and
103 // postpone the tab closing.
104 virtual bool IsDoingDrag() const = 0;
105 virtual void CancelDragAndCloseTab() = 0;
106
107 // Returns the current drop data, if any. 101 // Returns the current drop data, if any.
108 virtual WebDropData* GetDropData() const = 0; 102 virtual WebDropData* GetDropData() const = 0;
109 103
110 // If we close the tab while a UI control is in an event-tracking 104 // If we close the tab while a UI control is in an event-tracking
111 // loop, the control may message freed objects and crash. 105 // loop, the control may message freed objects and crash.
112 // WebContents::Close() calls IsEventTracking(), and if it returns 106 // WebContents::Close() calls IsEventTracking(), and if it returns
113 // true CloseTabAfterEventTracking() is called and the close is not 107 // true CloseTabAfterEventTracking() is called and the close is not
114 // completed. 108 // completed.
115 virtual bool IsEventTracking() const = 0; 109 virtual bool IsEventTracking() const = 0;
116 virtual void CloseTabAfterEventTracking() = 0; 110 virtual void CloseTabAfterEventTracking() = 0;
117 111
118 // Get the bounds of the View, relative to the parent. 112 // Get the bounds of the View, relative to the parent.
119 virtual gfx::Rect GetViewBounds() const = 0; 113 virtual gfx::Rect GetViewBounds() const = 0;
120 }; 114 };
121 115
122 } // namespace content 116 } // namespace content
123 117
124 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ 118 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_source_mac.mm ('k') | content/test/test_web_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698