Disable acclerated composition in frameless window.

This commit is contained in:
Cheng Zhao 2014-03-06 11:07:04 +08:00
parent 686493e8ec
commit 2f113286aa
3 changed files with 16 additions and 0 deletions

View file

@ -10,6 +10,7 @@
#include "browser/net/atom_url_request_context_getter.h"
#include "browser/window_list.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "webkit/common/webpreferences.h"
@ -67,6 +68,12 @@ void AtomBrowserClient::OverrideWebkitPrefs(
prefs->experimental_webgl_enabled = false;
prefs->allow_displaying_insecure_content = true;
prefs->allow_running_insecure_content = true;
NativeWindow* window = NativeWindow::FromRenderView(
render_view_host->GetProcess()->GetID(),
render_view_host->GetRoutingID());
if (window)
window->OverrideWebkitPrefs(url, prefs);
}
bool AtomBrowserClient::ShouldSwapProcessesForNavigation(