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

Unified Diff: sky/engine/web/WebViewImpl.cpp

Issue 690433004: Add inspect command to skydb (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
Index: sky/engine/web/WebViewImpl.cpp
diff --git a/sky/engine/web/WebViewImpl.cpp b/sky/engine/web/WebViewImpl.cpp
index f533ce8a768ff2240b8ede6912c25c743df47f7f..157590baa0382bc18d85044899c0868a9222a432 100644
--- a/sky/engine/web/WebViewImpl.cpp
+++ b/sky/engine/web/WebViewImpl.cpp
@@ -50,6 +50,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
+#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/ime/InputMethodContext.h"
#include "core/loader/FrameLoader.h"
@@ -1659,6 +1660,17 @@ WebFrame* WebViewImpl::focusedFrame()
return WebFrame::fromFrame(focusedCoreFrame());
}
+void WebViewImpl::injectModule(const WebString& name)
eseidel 2014/10/29 00:05:56 relativeURL?
+{
+ RefPtr<Document> document = m_page->mainFrame()->document();
+ RefPtr<HTMLLinkElement> link = HTMLLinkElement::create(*document, false);
+ link->setAttribute(HTMLNames::relAttr, "import");
+ link->setAttribute(HTMLNames::hrefAttr, name);
+ if (!document->documentElement())
+ return;
+ document->documentElement()->appendChild(link.release());
+}
+
void WebViewImpl::setFocusedFrame(WebFrame* frame)
{
if (!frame) {

Powered by Google App Engine
This is Rietveld 408576698