| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | |
| 4 * | |
| 5 * Redistribution and use in source and binary forms, with or without | |
| 6 * modification, are permitted provided that the following conditions are | |
| 7 * met: | |
| 8 * | |
| 9 * * Redistributions of source code must retain the above copyright | |
| 10 * notice, this list of conditions and the following disclaimer. | |
| 11 * * Redistributions in binary form must reproduce the above | |
| 12 * copyright notice, this list of conditions and the following disclaimer | |
| 13 * in the documentation and/or other materials provided with the | |
| 14 * distribution. | |
| 15 * * Neither the name of Google Inc. nor the names of its | |
| 16 * contributors may be used to endorse or promote products derived from | |
| 17 * this software without specific prior written permission. | |
| 18 * | |
| 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 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. | |
| 30 */ | |
| 31 | |
| 32 #ifndef SKY_ENGINE_WEB_FRAMELOADERCLIENTIMPL_H_ | |
| 33 #define SKY_ENGINE_WEB_FRAMELOADERCLIENTIMPL_H_ | |
| 34 | |
| 35 #include "sky/engine/core/loader/FrameLoaderClient.h" | |
| 36 #include "sky/engine/platform/weborigin/KURL.h" | |
| 37 #include "sky/engine/wtf/PassOwnPtr.h" | |
| 38 #include "sky/engine/wtf/RefPtr.h" | |
| 39 | |
| 40 namespace blink { | |
| 41 | |
| 42 class WebLocalFrameImpl; | |
| 43 | |
| 44 class FrameLoaderClientImpl final : public FrameLoaderClient { | |
| 45 public: | |
| 46 explicit FrameLoaderClientImpl(WebLocalFrameImpl* webFrame); | |
| 47 virtual ~FrameLoaderClientImpl(); | |
| 48 | |
| 49 WebLocalFrameImpl* webFrame() const { return m_webFrame; } | |
| 50 | |
| 51 // FrameLoaderClient ---------------------------------------------- | |
| 52 | |
| 53 virtual void documentElementAvailable() override; | |
| 54 | |
| 55 virtual void detachedFromParent() override; | |
| 56 virtual void dispatchWillSendRequest(Document*, unsigned long identifier, Re
sourceRequest&, const ResourceResponse& redirectResponse) override; | |
| 57 virtual void dispatchDidReceiveResponse(Document*, unsigned long identifier,
const ResourceResponse&) override; | |
| 58 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, Res
ourceLoadPriority, int intraPriorityValue) override; | |
| 59 virtual void dispatchDidFinishLoading(Document*, unsigned long identifier) o
verride; | |
| 60 virtual void dispatchDidLoadResourceFromMemoryCache(const ResourceRequest&,
const ResourceResponse&) override; | |
| 61 virtual void dispatchDidHandleOnloadEvents() override; | |
| 62 virtual void dispatchWillClose() override; | |
| 63 virtual void dispatchDidReceiveTitle(const String&) override; | |
| 64 virtual void dispatchDidFailLoad(const ResourceError&) override; | |
| 65 | |
| 66 virtual NavigationPolicy decidePolicyForNavigation(const ResourceRequest&, D
ocument*, NavigationPolicy, bool isTransitionNavigation) override; | |
| 67 virtual void dispatchAddNavigationTransitionData(const String& allowedDestin
ationOrigin, const String& selector, const String& markup) override; | |
| 68 virtual void dispatchWillRequestResource(FetchRequest*) override; | |
| 69 virtual void didStartLoading(LoadStartType) override; | |
| 70 virtual void didStopLoading() override; | |
| 71 virtual void progressEstimateChanged(double progressEstimate) override; | |
| 72 virtual void loadURLExternally(const ResourceRequest&, NavigationPolicy, con
st String& suggestedName = String()) override; | |
| 73 virtual mojo::View* createChildFrame() override; | |
| 74 virtual void selectorMatchChanged(const Vector<String>& addedSelectors, cons
t Vector<String>& removedSelectors) override; | |
| 75 virtual void transitionToCommittedForNewPage() override; | |
| 76 | |
| 77 virtual void didLoseWebGLContext(int arbRobustnessContextLostReason) overrid
e; | |
| 78 | |
| 79 virtual void dispatchDidChangeManifest() override; | |
| 80 virtual void didCreateIsolate(Dart_Isolate isolate) override; | |
| 81 | |
| 82 private: | |
| 83 virtual bool isFrameLoaderClientImpl() const override { return true; } | |
| 84 | |
| 85 // The WebFrame that owns this object and manages its lifetime. Therefore, | |
| 86 // the web frame object is guaranteed to exist. | |
| 87 WebLocalFrameImpl* m_webFrame; | |
| 88 }; | |
| 89 | |
| 90 DEFINE_TYPE_CASTS(FrameLoaderClientImpl, FrameLoaderClient, client, client->isFr
ameLoaderClientImpl(), client.isFrameLoaderClientImpl()); | |
| 91 | |
| 92 } // namespace blink | |
| 93 | |
| 94 #endif // SKY_ENGINE_WEB_FRAMELOADERCLIENTIMPL_H_ | |
| OLD | NEW |