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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual void RenderViewCreated(RenderViewHost* host) = 0; | 97 virtual void RenderViewCreated(RenderViewHost* host) = 0; |
98 | 98 |
99 // Invoked when the WebContents is notified that the RenderView has been | 99 // Invoked when the WebContents is notified that the RenderView has been |
100 // swapped in. | 100 // swapped in. |
101 virtual void RenderViewSwappedIn(RenderViewHost* host) = 0; | 101 virtual void RenderViewSwappedIn(RenderViewHost* host) = 0; |
102 | 102 |
103 // Invoked to enable/disable overscroll gesture navigation. | 103 // Invoked to enable/disable overscroll gesture navigation. |
104 virtual void SetOverscrollControllerEnabled(bool enabled) = 0; | 104 virtual void SetOverscrollControllerEnabled(bool enabled) = 0; |
105 | 105 |
106 #if defined(OS_MACOSX) | 106 #if defined(OS_MACOSX) |
107 // The web contents view assumes that its view will never be overlapped by | |
108 // another view (either partially or fully). This allows it to perform | |
109 // optimizations. If the view is in a view hierarchy where it might be | |
110 // overlapped by another view, notify the view by calling this with |true|. | |
111 virtual void SetAllowOverlappingViews(bool overlapping) = 0; | |
112 | |
113 // Returns true if overlapping views are allowed, false otherwise. | |
114 virtual bool GetAllowOverlappingViews() const = 0; | |
115 | |
116 // Allowing other views disables optimizations which assume that only a single | 107 // Allowing other views disables optimizations which assume that only a single |
117 // WebContents is present. | 108 // WebContents is present. |
118 virtual void SetAllowOtherViews(bool allow) = 0; | 109 virtual void SetAllowOtherViews(bool allow) = 0; |
119 | 110 |
120 // Returns true if other views are allowed, false otherwise. | 111 // Returns true if other views are allowed, false otherwise. |
121 virtual bool GetAllowOtherViews() const = 0; | 112 virtual bool GetAllowOtherViews() const = 0; |
122 | 113 |
123 // If we close the tab while a UI control is in an event-tracking | 114 // If we close the tab while a UI control is in an event-tracking |
124 // loop, the control may message freed objects and crash. | 115 // loop, the control may message freed objects and crash. |
125 // WebContents::Close() calls IsEventTracking(), and if it returns | 116 // WebContents::Close() calls IsEventTracking(), and if it returns |
126 // true CloseTabAfterEventTracking() is called and the close is not | 117 // true CloseTabAfterEventTracking() is called and the close is not |
127 // completed. | 118 // completed. |
128 virtual bool IsEventTracking() const = 0; | 119 virtual bool IsEventTracking() const = 0; |
129 virtual void CloseTabAfterEventTracking() = 0; | 120 virtual void CloseTabAfterEventTracking() = 0; |
130 #endif | 121 #endif |
131 }; | 122 }; |
132 | 123 |
133 } // namespace content | 124 } // namespace content |
134 | 125 |
135 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_ | 126 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_H_ |
OLD | NEW |