]> khamidou — GitHub mirrors - electron.git/commitdiff
Don't set browser_handles_all_top_level_requests
authorCheng Zhao <zcbenz@gmail.com>
Fri, 12 Jun 2015 08:23:26 +0000 (16:23 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 12 Jun 2015 08:26:04 +0000 (16:26 +0800)
POST requests currently can not be handled on browser side.

Fix #1945.

atom/browser/common_web_contents_delegate.cc

index eeb8d5748edcf55e7b2e2458e319a647dcbc16ad..087205d37d5bd35b080d689bfe7f796f2cfb199a 100644 (file)
@@ -16,7 +16,6 @@
 #include "content/public/browser/child_process_security_policy.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
-#include "content/public/common/renderer_preferences.h"
 #include "storage/browser/fileapi/isolated_context.h"
 
 namespace atom {
@@ -103,12 +102,6 @@ void CommonWebContentsDelegate::InitWithWebContents(
   owner_window_ = owner_window;
   web_contents->SetDelegate(this);
 
-  // Tell renderer to handle all navigations in browser.
-  auto preferences = web_contents->GetMutableRendererPrefs();
-  preferences->browser_handles_non_local_top_level_requests = true;
-  preferences->browser_handles_all_top_level_requests = true;
-  web_contents->GetRenderViewHost()->SyncRendererPrefs();
-
   // Create InspectableWebContents.
   web_contents_.reset(brightray::InspectableWebContents::Create(web_contents));
   web_contents_->SetDelegate(this);