Disable acclerated composition in frameless window.
This commit is contained in:
parent
686493e8ec
commit
2f113286aa
3 changed files with 16 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include "browser/net/atom_url_request_context_getter.h"
|
#include "browser/net/atom_url_request_context_getter.h"
|
||||||
#include "browser/window_list.h"
|
#include "browser/window_list.h"
|
||||||
#include "content/public/browser/render_process_host.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/site_instance.h"
|
||||||
#include "content/public/browser/web_contents.h"
|
#include "content/public/browser/web_contents.h"
|
||||||
#include "webkit/common/webpreferences.h"
|
#include "webkit/common/webpreferences.h"
|
||||||
|
@ -67,6 +68,12 @@ void AtomBrowserClient::OverrideWebkitPrefs(
|
||||||
prefs->experimental_webgl_enabled = false;
|
prefs->experimental_webgl_enabled = false;
|
||||||
prefs->allow_displaying_insecure_content = true;
|
prefs->allow_displaying_insecure_content = true;
|
||||||
prefs->allow_running_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(
|
bool AtomBrowserClient::ShouldSwapProcessesForNavigation(
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include "vendor/brightray/browser/inspectable_web_contents.h"
|
#include "vendor/brightray/browser/inspectable_web_contents.h"
|
||||||
#include "vendor/brightray/browser/inspectable_web_contents_view.h"
|
#include "vendor/brightray/browser/inspectable_web_contents_view.h"
|
||||||
#include "webkit/common/user_agent/user_agent_util.h"
|
#include "webkit/common/user_agent/user_agent_util.h"
|
||||||
|
#include "webkit/common/webpreferences.h"
|
||||||
|
|
||||||
using content::NavigationEntry;
|
using content::NavigationEntry;
|
||||||
|
|
||||||
|
@ -319,6 +320,12 @@ void NativeWindow::AppendExtraCommandLineSwitches(CommandLine* command_line,
|
||||||
node_integration_);
|
node_integration_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NativeWindow::OverrideWebkitPrefs(const GURL& url, WebPreferences* prefs) {
|
||||||
|
// FIXME Disable accelerated composition in frameless window.
|
||||||
|
if (!has_frame_)
|
||||||
|
prefs->accelerated_compositing_enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
void NativeWindow::NotifyWindowClosed() {
|
void NativeWindow::NotifyWindowClosed() {
|
||||||
if (is_closed_)
|
if (is_closed_)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "vendor/brightray/browser/inspectable_web_contents_impl.h"
|
#include "vendor/brightray/browser/inspectable_web_contents_impl.h"
|
||||||
|
|
||||||
class CommandLine;
|
class CommandLine;
|
||||||
|
struct WebPreferences;
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
class DictionaryValue;
|
class DictionaryValue;
|
||||||
|
@ -165,6 +166,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
||||||
// Called when renderer process is going to be started.
|
// Called when renderer process is going to be started.
|
||||||
void AppendExtraCommandLineSwitches(CommandLine* command_line,
|
void AppendExtraCommandLineSwitches(CommandLine* command_line,
|
||||||
int child_process_id);
|
int child_process_id);
|
||||||
|
void OverrideWebkitPrefs(const GURL& url, WebPreferences* prefs);
|
||||||
|
|
||||||
void AddObserver(NativeWindowObserver* obs) {
|
void AddObserver(NativeWindowObserver* obs) {
|
||||||
observers_.AddObserver(obs);
|
observers_.AddObserver(obs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue