| 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 27 matching lines...) Expand all Loading... |
| 38 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
| 39 #include "wtf/RefPtr.h" | 39 #include "wtf/RefPtr.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class WebLocalFrameImpl; | 43 class WebLocalFrameImpl; |
| 44 class WebPluginLoadObserver; | 44 class WebPluginLoadObserver; |
| 45 | 45 |
| 46 class FrameLoaderClientImpl final : public FrameLoaderClient { | 46 class FrameLoaderClientImpl final : public FrameLoaderClient { |
| 47 public: | 47 public: |
| 48 explicit FrameLoaderClientImpl(WebLocalFrameImpl* webFrame); | 48 static PassOwnPtrWillBeRawPtr<FrameLoaderClientImpl> create(WebLocalFrameImp
l*); |
| 49 |
| 49 ~FrameLoaderClientImpl() override; | 50 ~FrameLoaderClientImpl() override; |
| 50 | 51 |
| 51 WebLocalFrameImpl* webFrame() const { return m_webFrame; } | 52 DECLARE_VIRTUAL_TRACE(); |
| 53 |
| 54 WebLocalFrameImpl* webFrame() const { return m_webFrame.get(); } |
| 52 | 55 |
| 53 // FrameLoaderClient ---------------------------------------------- | 56 // FrameLoaderClient ---------------------------------------------- |
| 54 | 57 |
| 55 void didCreateNewDocument() override; | 58 void didCreateNewDocument() override; |
| 56 // Notifies the WebView delegate that the JS window object has been cleared, | 59 // Notifies the WebView delegate that the JS window object has been cleared, |
| 57 // giving it a chance to bind native objects to the window before script | 60 // giving it a chance to bind native objects to the window before script |
| 58 // parsing begins. | 61 // parsing begins. |
| 59 void dispatchDidClearWindowObjectInMainWorld() override; | 62 void dispatchDidClearWindowObjectInMainWorld() override; |
| 60 void documentElementAvailable() override; | 63 void documentElementAvailable() override; |
| 61 | 64 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 176 |
| 174 PassOwnPtr<WebApplicationCacheHost> createApplicationCacheHost(WebApplicatio
nCacheHostClient*) override; | 177 PassOwnPtr<WebApplicationCacheHost> createApplicationCacheHost(WebApplicatio
nCacheHostClient*) override; |
| 175 | 178 |
| 176 void didStopAllLoaders() override; | 179 void didStopAllLoaders() override; |
| 177 | 180 |
| 178 void dispatchDidChangeManifest() override; | 181 void dispatchDidChangeManifest() override; |
| 179 | 182 |
| 180 unsigned backForwardLength() override; | 183 unsigned backForwardLength() override; |
| 181 | 184 |
| 182 void suddenTerminationDisablerChanged(bool present, SuddenTerminationDisable
rType) override; | 185 void suddenTerminationDisablerChanged(bool present, SuddenTerminationDisable
rType) override; |
| 186 |
| 183 private: | 187 private: |
| 188 explicit FrameLoaderClientImpl(WebLocalFrameImpl*); |
| 189 |
| 184 bool isFrameLoaderClientImpl() const override { return true; } | 190 bool isFrameLoaderClientImpl() const override { return true; } |
| 185 | 191 |
| 186 PassOwnPtr<WebPluginLoadObserver> pluginLoadObserver(DocumentLoader*); | 192 PassOwnPtr<WebPluginLoadObserver> pluginLoadObserver(DocumentLoader*); |
| 187 | 193 |
| 188 // The WebFrame that owns this object and manages its lifetime. Therefore, | 194 // The WebFrame that owns this object and manages its lifetime. Therefore, |
| 189 // the web frame object is guaranteed to exist. | 195 // the web frame object is guaranteed to exist. |
| 190 WebLocalFrameImpl* m_webFrame; | 196 RawPtrWillBeMember<WebLocalFrameImpl> m_webFrame; |
| 191 }; | 197 }; |
| 192 | 198 |
| 193 DEFINE_TYPE_CASTS(FrameLoaderClientImpl, FrameLoaderClient, client, client->isFr
ameLoaderClientImpl(), client.isFrameLoaderClientImpl()); | 199 DEFINE_TYPE_CASTS(FrameLoaderClientImpl, FrameLoaderClient, client, client->isFr
ameLoaderClientImpl(), client.isFrameLoaderClientImpl()); |
| 194 | 200 |
| 195 } // namespace blink | 201 } // namespace blink |
| 196 | 202 |
| 197 #endif | 203 #endif |
| OLD | NEW |