| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |