diff --git a/atom/renderer/atom_renderer_client.cc b/atom/renderer/atom_renderer_client.cc index 86c9eb1cdeb6..21ced4aedb86 100644 --- a/atom/renderer/atom_renderer_client.cc +++ b/atom/renderer/atom_renderer_client.cc @@ -52,10 +52,6 @@ bool IsSwitchEnabled(base::CommandLine* command_line, return true; } -bool IsGuestFrame(blink::WebFrame* frame) { - return frame->uniqueName().utf8() == "ATOM_SHELL_GUEST_WEB_VIEW"; -} - // global.Uint8Array; v8::Local GetUint8ArrayConstructor( v8::Isolate* isolate, v8::Local context) { @@ -189,14 +185,11 @@ bool AtomRendererClient::OverrideCreatePlugin( void AtomRendererClient::DidCreateScriptContext( blink::WebFrame* frame, v8::Handle context) { - // Only attach node bindings in main frame or guest frame. - if (!IsGuestFrame(frame)) { - if (main_frame_) - return; + if (main_frame_) + return; - // The first web frame is the main frame. - main_frame_ = frame; - } + // 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(); @@ -221,10 +214,6 @@ bool AtomRendererClient::ShouldFork(blink::WebFrame* frame, bool is_initial_navigation, bool is_server_redirect, bool* send_referrer) { - // Never fork renderer process for guests. - if (IsGuestFrame(frame)) - return false; - // Handle all the navigations and reloads in browser. // FIXME We only support GET here because http method will be ignored when // the OpenURLFromTab is triggered, which means form posting would not work, diff --git a/atom/renderer/lib/init.coffee b/atom/renderer/lib/init.coffee index 32d3ee76d1b9..9825f75be928 100644 --- a/atom/renderer/lib/init.coffee +++ b/atom/renderer/lib/init.coffee @@ -29,8 +29,6 @@ for arg in process.argv if arg.indexOf('--guest-instance-id=') == 0 # This is a guest web view. process.guestInstanceId = parseInt arg.substr(arg.indexOf('=') + 1) - # Set the frame name to make AtomRendererClient recognize this guest. - require('web-frame').setName 'ATOM_SHELL_GUEST_WEB_VIEW' else if arg.indexOf('--node-integration=') == 0 nodeIntegration = arg.substr arg.indexOf('=') + 1 else if arg.indexOf('--preload=') == 0