Insert node integration for all main frames
This commit is contained in:
parent
9ecc4bcb7d
commit
ebedb60684
2 changed files with 3 additions and 9 deletions
|
@ -109,8 +109,7 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver {
|
|||
|
||||
AtomRendererClient::AtomRendererClient()
|
||||
: node_bindings_(NodeBindings::Create(false)),
|
||||
atom_bindings_(new AtomBindings),
|
||||
main_frame_(nullptr) {
|
||||
atom_bindings_(new AtomBindings) {
|
||||
}
|
||||
|
||||
AtomRendererClient::~AtomRendererClient() {
|
||||
|
@ -185,12 +184,10 @@ bool AtomRendererClient::OverrideCreatePlugin(
|
|||
void AtomRendererClient::DidCreateScriptContext(
|
||||
blink::WebFrame* frame,
|
||||
v8::Handle<v8::Context> context) {
|
||||
if (main_frame_)
|
||||
// Only insert node integration for the main frame.
|
||||
if (frame->parent())
|
||||
return;
|
||||
|
||||
// The first web frame is the main frame.
|
||||
main_frame_ = frame;
|
||||
|
||||
// Give the node loop a run to make sure everything is ready.
|
||||
node_bindings_->RunMessageLoop();
|
||||
|
||||
|
|
|
@ -64,9 +64,6 @@ class AtomRendererClient : public content::ContentRendererClient,
|
|||
scoped_ptr<NodeBindings> node_bindings_;
|
||||
scoped_ptr<AtomBindings> atom_bindings_;
|
||||
|
||||
// The main frame.
|
||||
blink::WebFrame* main_frame_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomRendererClient);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue