return true;
}
-bool IsGuestFrame(blink::WebFrame* frame) {
- return frame->uniqueName().utf8() == "ATOM_SHELL_GUEST_WEB_VIEW";
-}
-
// global.Uint8Array;
v8::Local<v8::Function> GetUint8ArrayConstructor(
v8::Isolate* isolate, v8::Local<v8::Context> context) {
void AtomRendererClient::DidCreateScriptContext(
blink::WebFrame* frame,
v8::Handle<v8::Context> 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();
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,
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