Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / LinkManifest.cpp
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/html/LinkManifest.h"
7
8 #include "core/dom/Document.h"
9 #include "core/frame/LocalFrame.h"
10 #include "core/html/HTMLLinkElement.h"
11 #include "core/loader/FrameLoaderClient.h"
12
13 namespace WebCore {
14
15 PassOwnPtrWillBeRawPtr<LinkManifest> LinkManifest::create(HTMLLinkElement* owner)
16 {
17     return adoptPtrWillBeNoop(new LinkManifest(owner));
18 }
19
20 LinkManifest::LinkManifest(HTMLLinkElement* owner)
21     : LinkResource(owner)
22 {
23 }
24
25 LinkManifest::~LinkManifest()
26 {
27 }
28
29 void LinkManifest::process()
30 {
31     if (!m_owner || !m_owner->document().frame())
32         return;
33
34     m_owner->document().frame()->loader().client()->dispatchDidChangeManifest();
35 }
36
37 bool LinkManifest::hasLoaded() const
38 {
39     return false;
40 }
41
42 void LinkManifest::ownerRemoved()
43 {
44     process();
45 }
46
47 } // namespace WebCore