AtomRendererClient::AtomRendererClient()
: node_bindings_(NodeBindings::Create(false)),
- atom_bindings_(new AtomBindings),
- main_frame_(nullptr) {
+ atom_bindings_(new AtomBindings) {
}
AtomRendererClient::~AtomRendererClient() {
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();
scoped_ptr<NodeBindings> node_bindings_;
scoped_ptr<AtomBindings> atom_bindings_;
- // The main frame.
- blink::WebFrame* main_frame_;
-
DISALLOW_COPY_AND_ASSIGN(AtomRendererClient);
};