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; } |
153 | 154 |
154 // This frame has set its opener to another frame, or disowned the opener | 155 // This frame has set its opener to another frame, or disowned the opener |
155 // if opener is null. See http://html.spec.whatwg.org/#dom-opener. | 156 // if opener is null. See http://html.spec.whatwg.org/#dom-opener. |
156 virtual void didChangeOpener(WebFrame*) { } | 157 virtual void didChangeOpener(WebFrame*) { } |
157 | 158 |
158 // Specifies the reason for the detachment. | 159 // Specifies the reason for the detachment. |
159 enum class DetachType { Remove, Swap }; | 160 enum class DetachType { Remove, Swap }; |
160 | 161 |
161 // This frame has been detached from the view, but has not been closed yet. | 162 // This frame has been detached from the view, but has not been closed yet. |
162 virtual void frameDetached(WebFrame*, DetachType) { } | 163 virtual void frameDetached(WebFrame*, DetachType) { } |
163 | 164 |
164 // This frame has become focused.. | 165 // This frame has become focused.. |
165 virtual void frameFocused() { } | 166 virtual void frameFocused() { } |
166 | 167 |
167 // This frame is about to be closed. This is called after frameDetached, | 168 // This frame is about to be closed. This is called after frameDetached, |
168 // when the document is being unloaded, due to new one committing. | 169 // when the document is being unloaded, due to new one committing. |
169 virtual void willClose(WebFrame*) { } | 170 virtual void willClose(WebFrame*) { } |
170 | 171 |
171 // This frame's name has changed. | 172 // This frame's name has changed. |
172 virtual void didChangeName(WebLocalFrame*, const WebString&) { } | 173 virtual void didChangeName(WebLocalFrame*, const WebString&) { } |
173 | 174 |
174 // The sandbox flags have changed for a child frame of this frame. | 175 // The sandbox flags have changed for a child frame of this frame. |
175 virtual void didChangeSandboxFlags(WebFrame* childFrame, WebSandboxFlags fla
gs) { } | 176 virtual void didChangeSandboxFlags(WebFrame* childFrame, WebSandboxFlags fla
gs) { } |
176 | 177 |
| 178 // Some frame owner properties have changed for a child frame of this frame.
Frame owner properties currently include: scrolling, marginwidth and marginhei
ght. |
| 179 virtual void didChangeFrameOwnerProperties(WebFrame* childFrame, const WebFr
ameOwnerProperties&) { } |
| 180 |
177 // Called when a watched CSS selector matches or stops matching. | 181 // Called when a watched CSS selector matches or stops matching. |
178 virtual void didMatchCSS(WebLocalFrame*, const WebVector<WebString>& newlyMa
tchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { } | 182 virtual void didMatchCSS(WebLocalFrame*, const WebVector<WebString>& newlyMa
tchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { } |
179 | 183 |
180 | 184 |
181 // Console messages ---------------------------------------------------- | 185 // Console messages ---------------------------------------------------- |
182 | 186 |
183 // Whether or not we should report a detailed message for the given source. | 187 // Whether or not we should report a detailed message for the given source. |
184 virtual bool shouldReportDetailedMessageForSource(const WebString& source) {
return false; } | 188 virtual bool shouldReportDetailedMessageForSource(const WebString& source) {
return false; } |
185 | 189 |
186 // A new message was added to the console. | 190 // A new message was added to the console. |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 // WebUSB -------------------------------------------------------------- | 666 // WebUSB -------------------------------------------------------------- |
663 virtual WebUSBClient* usbClient() { return nullptr; } | 667 virtual WebUSBClient* usbClient() { return nullptr; } |
664 | 668 |
665 protected: | 669 protected: |
666 virtual ~WebFrameClient() { } | 670 virtual ~WebFrameClient() { } |
667 }; | 671 }; |
668 | 672 |
669 } // namespace blink | 673 } // namespace blink |
670 | 674 |
671 #endif | 675 #endif |
OLD | NEW |