Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2127)

Unified Diff: Source/web/WebDocument.cpp

Issue 535283003: Add WebDocument::manifestURL(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move to document Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/web/WebDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDocument.cpp
diff --git a/Source/web/WebDocument.cpp b/Source/web/WebDocument.cpp
index 987d16993d96180a80fb1939f42c38ab4fa75014..37b3a60861b601fa31ba0e3b8fda4a1f0e57c28e 100644
--- a/Source/web/WebDocument.cpp
+++ b/Source/web/WebDocument.cpp
@@ -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)
{
« no previous file with comments | « no previous file | public/web/WebDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698