| Index: third_party/WebKit/public/web/WebFrameClient.h
|
| diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h
|
| index c0707d3172718d53d9a6a43ba1c5c263c6894cc2..e2c7a2075f5a16bb984f1a77121277ec2df68443 100644
|
| --- a/third_party/WebKit/public/web/WebFrameClient.h
|
| +++ b/third_party/WebKit/public/web/WebFrameClient.h
|
| @@ -83,7 +83,6 @@
|
| class WebFileChooserCompletion;
|
| class WebFormElement;
|
| class WebInstalledAppClient;
|
| -class WebLocalFrame;
|
| class WebMediaPlayer;
|
| class WebMediaPlayerClient;
|
| class WebMediaPlayerEncryptedMediaClient;
|
| @@ -109,10 +108,8 @@
|
| struct WebRect;
|
| struct WebURLError;
|
|
|
| -class BLINK_EXPORT WebFrameClient {
|
| +class WebFrameClient {
|
| public:
|
| - virtual ~WebFrameClient() {}
|
| -
|
| // Factory methods -----------------------------------------------------
|
|
|
| // May return null.
|
| @@ -159,11 +156,13 @@
|
| // pending navigation's URL, because a URL spoof is possible.
|
| virtual void didAccessInitialDocument() { }
|
|
|
| - // Request the creation of a new child frame. Embedders may return nullptr
|
| - // to prevent the new child frame from being attached. Otherwise, embedders
|
| - // should create a new WebLocalFrame, insert it into the frame tree, and
|
| - // return the created frame.
|
| - virtual WebLocalFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType, const WebString& name, const WebString& uniqueName, WebSandboxFlags sandboxFlags, const WebFrameOwnerProperties&) { return nullptr; }
|
| + // A child frame was created in this frame. This is called when the frame
|
| + // is created and initialized. Takes the name of the new frame, the parent
|
| + // frame and returns a new WebFrame. The WebFrame is considered in-use
|
| + // until frameDetached() is called on it.
|
| + // Note: If you override this, you should almost certainly be overriding
|
| + // frameDetached().
|
| + virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType, const WebString& name, const WebString& uniqueName, WebSandboxFlags sandboxFlags, const WebFrameOwnerProperties&) { return nullptr; }
|
|
|
| // This frame has set its opener to another frame, or disowned the opener
|
| // if opener is null. See http://html.spec.whatwg.org/#dom-opener.
|
| @@ -172,17 +171,15 @@
|
| // Specifies the reason for the detachment.
|
| enum class DetachType { Remove, Swap };
|
|
|
| - // This frame has been detached. Embedders should release any resources
|
| - // associated with this frame. If the DetachType is Remove, the frame should
|
| - // also be removed from the frame tree; otherwise, if the DetachType is
|
| - // Swap, the frame is being replaced in-place by WebFrame::swap().
|
| - virtual void frameDetached(WebLocalFrame*, DetachType);
|
| -
|
| - // This frame has become focused.
|
| + // This frame has been detached from the view, but has not been closed yet.
|
| + virtual void frameDetached(WebLocalFrame*, DetachType) {}
|
| +
|
| + // This frame has become focused..
|
| virtual void frameFocused() { }
|
|
|
| - // A provisional load is about to commit.
|
| - virtual void willCommitProvisionalLoad(WebLocalFrame*) {}
|
| + // This frame is about to be closed. This is called after frameDetached,
|
| + // when the document is being unloaded, due to new one committing.
|
| + virtual void willClose(WebFrame*) { }
|
|
|
| // This frame's name has changed.
|
| virtual void didChangeName(const WebString& name, const WebString& uniqueName) { }
|
| @@ -696,6 +693,9 @@
|
| {
|
| return WebURL();
|
| }
|
| +
|
| +protected:
|
| + virtual ~WebFrameClient() { }
|
| };
|
|
|
| } // namespace blink
|
|
|