Schemas should be registered early
This commit is contained in:
parent
380de24f2e
commit
d26dcd5501
2 changed files with 4 additions and 3 deletions
|
@ -8,7 +8,6 @@
|
||||||
#include "native_mate/dictionary.h"
|
#include "native_mate/dictionary.h"
|
||||||
#include "native_mate/object_template_builder.h"
|
#include "native_mate/object_template_builder.h"
|
||||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||||
#include "third_party/WebKit/public/web/WebCustomElement.h"
|
|
||||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||||
#include "third_party/WebKit/public/web/WebView.h"
|
#include "third_party/WebKit/public/web/WebView.h"
|
||||||
|
|
||||||
|
@ -54,8 +53,6 @@ double WebView::GetZoomFactor() const {
|
||||||
|
|
||||||
v8::Handle<v8::Value> WebView::RegisterEmbedderCustomElement(
|
v8::Handle<v8::Value> WebView::RegisterEmbedderCustomElement(
|
||||||
const base::string16& name, v8::Handle<v8::Object> options) {
|
const base::string16& name, v8::Handle<v8::Object> options) {
|
||||||
blink::WebCustomElement::addEmbedderCustomElementName(name);
|
|
||||||
|
|
||||||
auto document = blink::WebLocalFrame::frameForCurrentContext()->document();
|
auto document = blink::WebLocalFrame::frameForCurrentContext()->document();
|
||||||
blink::WebExceptionCode ec = 0;
|
blink::WebExceptionCode ec = 0;
|
||||||
return document.registerEmbedderCustomElement(name, options, ec);
|
return document.registerEmbedderCustomElement(name, options, ec);
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "content/public/renderer/render_thread.h"
|
#include "content/public/renderer/render_thread.h"
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "native_mate/converter.h"
|
#include "native_mate/converter.h"
|
||||||
|
#include "third_party/WebKit/public/web/WebCustomElement.h"
|
||||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||||
#include "third_party/WebKit/public/web/WebFrame.h"
|
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||||
#include "third_party/WebKit/public/web/WebKit.h"
|
#include "third_party/WebKit/public/web/WebKit.h"
|
||||||
|
@ -99,6 +100,9 @@ AtomRendererClient::~AtomRendererClient() {
|
||||||
void AtomRendererClient::WebKitInitialized() {
|
void AtomRendererClient::WebKitInitialized() {
|
||||||
EnableWebRuntimeFeatures();
|
EnableWebRuntimeFeatures();
|
||||||
|
|
||||||
|
blink::WebCustomElement::addEmbedderCustomElementName("webview");
|
||||||
|
blink::WebCustomElement::addEmbedderCustomElementName("browserplugin");
|
||||||
|
|
||||||
if (!IsNodeBindingEnabled())
|
if (!IsNodeBindingEnabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue