| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // If we close the tab while a UI control is in an event-tracking | 110 // If we close the tab while a UI control is in an event-tracking |
| 111 // loop, the control may message freed objects and crash. | 111 // loop, the control may message freed objects and crash. |
| 112 // WebContents::Close() calls IsEventTracking(), and if it returns | 112 // WebContents::Close() calls IsEventTracking(), and if it returns |
| 113 // true CloseTabAfterEventTracking() is called and the close is not | 113 // true CloseTabAfterEventTracking() is called and the close is not |
| 114 // completed. | 114 // completed. |
| 115 virtual bool IsEventTracking() const = 0; | 115 virtual bool IsEventTracking() const = 0; |
| 116 virtual void CloseTabAfterEventTracking() = 0; | 116 virtual void CloseTabAfterEventTracking() = 0; |
| 117 | 117 |
| 118 // Get the bounds of the View, relative to the parent. | 118 // Get the bounds of the View, relative to the parent. |
| 119 virtual gfx::Rect GetViewBounds() const = 0; | 119 virtual gfx::Rect GetViewBounds() const = 0; |
| 120 |
| 121 #if defined(OS_MACOSX) |
| 122 // The web contents view assumes that its view will never be overlapped by |
| 123 // another view (either partially or fully). This allows it to perform |
| 124 // optimizations. If the view is in a view hierarchy where it might be |
| 125 // overlapped by another view, notify the view by calling this with |true| |
| 126 // before it draws for the first time. After the first draw, do not change |
| 127 // this setting. |
| 128 virtual void SetAllowOverlappingViews(bool overlapping) = 0; |
| 129 #endif |
| 120 }; | 130 }; |
| 121 | 131 |
| 122 } // namespace content | 132 } // namespace content |
| 123 | 133 |
| 124 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ | 134 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ |
| OLD | NEW |