Commit ceb12040 authored by mlamouri@chromium.org's avatar mlamouri@chromium.org

Add WebDocument::manifestURL().

BUG=410419

Review URL: https://codereview.chromium.org/535283003

git-svn-id: svn://svn.chromium.org/blink/trunk@181624 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c1263b90
......@@ -49,6 +49,7 @@
#include "core/html/HTMLElement.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLHeadElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/loader/DocumentLoader.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderView.h"
......@@ -336,6 +337,15 @@ v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString
return constructor.v8Value();
}
WebURL WebDocument::manifestURL() const
{
const Document* document = constUnwrap<Document>();
HTMLLinkElement* linkElement = document->linkManifest();
if (!linkElement)
return WebURL();
return linkElement->href();
}
WebDocument::WebDocument(const PassRefPtrWillBeRawPtr<Document>& elem)
: WebNode(elem)
{
......
......@@ -143,6 +143,8 @@ public:
BLINK_EXPORT v8::Handle<v8::Value> registerEmbedderCustomElement(const WebString& name, v8::Handle<v8::Value> options, WebExceptionCode&);
BLINK_EXPORT WebURL manifestURL() const;
#if BLINK_IMPLEMENTATION
WebDocument(const PassRefPtrWillBeRawPtr<Document>&);
WebDocument& operator=(const PassRefPtrWillBeRawPtr<Document>&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment