OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... | |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebFrameClient_h | 31 #ifndef WebFrameClient_h |
32 #define WebFrameClient_h | 32 #define WebFrameClient_h |
33 | 33 |
34 #include "../platform/WebColor.h" | 34 #include "../platform/WebColor.h" |
35 #include "WebAXObject.h" | 35 #include "WebAXObject.h" |
36 #include "WebDOMMessageEvent.h" | 36 #include "WebDOMMessageEvent.h" |
37 #include "WebDataSource.h" | 37 #include "WebDataSource.h" |
38 #include "WebFrame.h" | 38 #include "WebFrame.h" |
39 #include "WebFrameOwnerProperties.h" | |
39 #include "WebHistoryCommitType.h" | 40 #include "WebHistoryCommitType.h" |
40 #include "WebHistoryItem.h" | 41 #include "WebHistoryItem.h" |
41 #include "WebIconURL.h" | 42 #include "WebIconURL.h" |
42 #include "WebNavigationPolicy.h" | 43 #include "WebNavigationPolicy.h" |
43 #include "WebNavigationType.h" | 44 #include "WebNavigationType.h" |
44 #include "WebNavigatorContentUtilsClient.h" | 45 #include "WebNavigatorContentUtilsClient.h" |
45 #include "WebSandboxFlags.h" | 46 #include "WebSandboxFlags.h" |
46 #include "WebTextDirection.h" | 47 #include "WebTextDirection.h" |
47 #include "public/platform/WebCommon.h" | 48 #include "public/platform/WebCommon.h" |
48 #include "public/platform/WebFileSystem.h" | 49 #include "public/platform/WebFileSystem.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 // document of a main frame. After this, it is no longer safe to show a | 143 // document of a main frame. After this, it is no longer safe to show a |
143 // pending navigation's URL, because a URL spoof is possible. | 144 // pending navigation's URL, because a URL spoof is possible. |
144 virtual void didAccessInitialDocument(WebLocalFrame*) { } | 145 virtual void didAccessInitialDocument(WebLocalFrame*) { } |
145 | 146 |
146 // A child frame was created in this frame. This is called when the frame | 147 // A child frame was created in this frame. This is called when the frame |
147 // is created and initialized. Takes the name of the new frame, the parent | 148 // is created and initialized. Takes the name of the new frame, the parent |
148 // frame and returns a new WebFrame. The WebFrame is considered in-use | 149 // frame and returns a new WebFrame. The WebFrame is considered in-use |
149 // until frameDetached() is called on it. | 150 // until frameDetached() is called on it. |
150 // Note: If you override this, you should almost certainly be overriding | 151 // Note: If you override this, you should almost certainly be overriding |
151 // frameDetached(). | 152 // frameDetached(). |
152 virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType, const WebString& frameName, WebSandboxFlags sandboxFlags) { return nullptr; } | 153 virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType, const WebString& frameName, WebSandboxFlags sandboxFlags, const WebFrameOwnerPro perties&) { return nullptr; } |
alexmos
2015/09/02 21:37:06
Changing this signature was "fun" the last time I
lazyboy
2015/09/15 01:40:33
This probably moved to components/printing/rendere
alexmos
2015/09/16 00:36:47
Yes, looks like it.
| |
153 | 154 |
154 // This frame set its opener to null, disowning it. | 155 // This frame set its opener to null, disowning it. |
155 // See http://html.spec.whatwg.org/#dom-opener. | 156 // See http://html.spec.whatwg.org/#dom-opener. |
156 // TODO(alexmos): Remove this once didChangeOpener is implemented in content . | 157 // TODO(alexmos): Remove this once didChangeOpener is implemented in content . |
157 virtual void didDisownOpener(WebLocalFrame*) { } | 158 virtual void didDisownOpener(WebLocalFrame*) { } |
158 | 159 |
159 // This frame has set its opener to another frame, or disowned the opener | 160 // This frame has set its opener to another frame, or disowned the opener |
160 // if opener is null. See http://html.spec.whatwg.org/#dom-opener. | 161 // if opener is null. See http://html.spec.whatwg.org/#dom-opener. |
161 virtual void didChangeOpener(WebFrame*) { } | 162 virtual void didChangeOpener(WebFrame*) { } |
162 | 163 |
163 // Specifies the reason for the detachment. | 164 // Specifies the reason for the detachment. |
164 enum class DetachType { Remove, Swap }; | 165 enum class DetachType { Remove, Swap }; |
165 | 166 |
166 // This frame has been detached from the view, but has not been closed yet. | 167 // This frame has been detached from the view, but has not been closed yet. |
167 virtual void frameDetached(WebFrame*, DetachType) { } | 168 virtual void frameDetached(WebFrame*, DetachType) { } |
168 | 169 |
169 // This frame has become focused.. | 170 // This frame has become focused.. |
170 virtual void frameFocused() { } | 171 virtual void frameFocused() { } |
171 | 172 |
172 // This frame is about to be closed. This is called after frameDetached, | 173 // This frame is about to be closed. This is called after frameDetached, |
173 // when the document is being unloaded, due to new one committing. | 174 // when the document is being unloaded, due to new one committing. |
174 virtual void willClose(WebFrame*) { } | 175 virtual void willClose(WebFrame*) { } |
175 | 176 |
176 // This frame's name has changed. | 177 // This frame's name has changed. |
177 virtual void didChangeName(WebLocalFrame*, const WebString&) { } | 178 virtual void didChangeName(WebLocalFrame*, const WebString&) { } |
178 | 179 |
179 // The sandbox flags have changed for a child frame of this frame. | 180 // The sandbox flags have changed for a child frame of this frame. |
180 virtual void didChangeSandboxFlags(WebFrame* childFrame, WebSandboxFlags fla gs) { } | 181 virtual void didChangeSandboxFlags(WebFrame* childFrame, WebSandboxFlags fla gs) { } |
181 | 182 |
183 // The "marginwidth" property has changed for a child frame of this frame. | |
184 virtual void didChangeMarginWidth(WebFrame* childFrame, int newMarginWidth) {} | |
185 | |
186 // The "marginheight" property has changed for a child frame of this frame. | |
187 virtual void didChangeMarginHeight(WebFrame* childFrame, int newMarginHeight ) {} | |
188 | |
189 // The "scrolling" property has changed for a child frame of this frame. | |
190 virtual void didChangeScrollingMode(WebFrame* childFrame, WebFrameOwnerPrope rties::ScrollingMode) {} | |
191 | |
182 // Called when a watched CSS selector matches or stops matching. | 192 // Called when a watched CSS selector matches or stops matching. |
183 virtual void didMatchCSS(WebLocalFrame*, const WebVector<WebString>& newlyMa tchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { } | 193 virtual void didMatchCSS(WebLocalFrame*, const WebVector<WebString>& newlyMa tchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { } |
184 | 194 |
185 | 195 |
186 // Console messages ---------------------------------------------------- | 196 // Console messages ---------------------------------------------------- |
187 | 197 |
188 // Whether or not we should report a detailed message for the given source. | 198 // Whether or not we should report a detailed message for the given source. |
189 virtual bool shouldReportDetailedMessageForSource(const WebString& source) { return false; } | 199 virtual bool shouldReportDetailedMessageForSource(const WebString& source) { return false; } |
190 | 200 |
191 // A new message was added to the console. | 201 // A new message was added to the console. |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
673 // WebUSB -------------------------------------------------------------- | 683 // WebUSB -------------------------------------------------------------- |
674 virtual WebUSBClient* usbClient() { return nullptr; } | 684 virtual WebUSBClient* usbClient() { return nullptr; } |
675 | 685 |
676 protected: | 686 protected: |
677 virtual ~WebFrameClient() { } | 687 virtual ~WebFrameClient() { } |
678 }; | 688 }; |
679 | 689 |
680 } // namespace blink | 690 } // namespace blink |
681 | 691 |
682 #endif | 692 #endif |
OLD | NEW |