OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 14 matching lines...) Expand all Loading... |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #ifndef FrameLoaderClientImpl_h | 32 #ifndef FrameLoaderClientImpl_h |
33 #define FrameLoaderClientImpl_h | 33 #define FrameLoaderClientImpl_h |
34 | 34 |
| 35 #include <memory> |
35 #include "core/loader/FrameLoaderClient.h" | 36 #include "core/loader/FrameLoaderClient.h" |
36 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
37 #include "platform/weborigin/KURL.h" | 38 #include "platform/weborigin/KURL.h" |
38 #include "public/platform/WebInsecureRequestPolicy.h" | 39 #include "public/platform/WebInsecureRequestPolicy.h" |
39 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
40 #include <memory> | |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class WebDevToolsAgentImpl; | 44 class WebDevToolsAgentImpl; |
45 class WebLocalFrameImpl; | 45 class WebLocalFrameImpl; |
46 | 46 |
47 class FrameLoaderClientImpl final : public FrameLoaderClient { | 47 class FrameLoaderClientImpl final : public FrameLoaderClient { |
48 public: | 48 public: |
49 static FrameLoaderClientImpl* create(WebLocalFrameImpl*); | 49 static FrameLoaderClientImpl* create(WebLocalFrameImpl*); |
50 | 50 |
51 ~FrameLoaderClientImpl() override; | 51 ~FrameLoaderClientImpl() override; |
52 | 52 |
53 DECLARE_VIRTUAL_TRACE(); | 53 DECLARE_VIRTUAL_TRACE(); |
54 | 54 |
55 WebLocalFrameImpl* webFrame() const { return m_webFrame.get(); } | 55 WebLocalFrameImpl* webFrame() const { return m_webFrame.get(); } |
56 | 56 |
57 // FrameLoaderClient ---------------------------------------------- | 57 // FrameLoaderClient ---------------------------------------------- |
58 | 58 |
59 void didCreateNewDocument() override; | 59 void didCreateNewDocument() override; |
60 // Notifies the WebView delegate that the JS window object has been cleared, | 60 // Notifies the WebView delegate that the JS window object has been cleared, |
61 // giving it a chance to bind native objects to the window before script | 61 // giving it a chance to bind native objects to the window before script |
62 // parsing begins. | 62 // parsing begins. |
63 void dispatchDidClearWindowObjectInMainWorld() override; | 63 void dispatchDidClearWindowObjectInMainWorld() override; |
64 void documentElementAvailable() override; | 64 void documentElementAvailable() override; |
65 void runScriptsAtDocumentElementAvailable() override; | 65 void runScriptsAtDocumentElementAvailable() override; |
66 void runScriptsAtDocumentReady(bool documentIsEmpty) override; | 66 void runScriptsAtDocumentReady(bool documentIsEmpty) override; |
67 | 67 |
68 void didCreateScriptContext(v8::Local<v8::Context>, | 68 void didCreateScriptContext(v8::Local<v8::Context>, int worldId) override; |
69 int worldId) override; | |
70 void willReleaseScriptContext(v8::Local<v8::Context>, int worldId) override; | 69 void willReleaseScriptContext(v8::Local<v8::Context>, int worldId) override; |
71 | 70 |
72 // Returns true if we should allow register V8 extensions to be added. | 71 // Returns true if we should allow register V8 extensions to be added. |
73 bool allowScriptExtensions() override; | 72 bool allowScriptExtensions() override; |
74 | 73 |
75 bool hasWebView() const override; | 74 bool hasWebView() const override; |
76 bool inShadowTree() const override; | 75 bool inShadowTree() const override; |
77 Frame* opener() const override; | 76 Frame* opener() const override; |
78 void setOpener(Frame*) override; | 77 void setOpener(Frame*) override; |
79 Frame* parent() const override; | 78 Frame* parent() const override; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 235 |
237 DEFINE_TYPE_CASTS(FrameLoaderClientImpl, | 236 DEFINE_TYPE_CASTS(FrameLoaderClientImpl, |
238 FrameLoaderClient, | 237 FrameLoaderClient, |
239 client, | 238 client, |
240 client->isFrameLoaderClientImpl(), | 239 client->isFrameLoaderClientImpl(), |
241 client.isFrameLoaderClientImpl()); | 240 client.isFrameLoaderClientImpl()); |
242 | 241 |
243 } // namespace blink | 242 } // namespace blink |
244 | 243 |
245 #endif | 244 #endif |
OLD | NEW |