renderer: option to override page visiblity state

This commit is contained in:
deepak1556 2015-06-01 12:58:20 +05:30
parent 3c186946eb
commit 683917ae67
6 changed files with 25 additions and 0 deletions

View file

@ -191,6 +191,21 @@ content::BrowserPluginDelegate* AtomRendererClient::CreateBrowserPluginDelegate(
}
}
bool AtomRendererClient::ShouldOverridePageVisibilityState(
const content::RenderFrame* render_frame,
blink::WebPageVisibilityState* override_state) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
bool b;
if (IsSwitchEnabled(command_line, switches::kPageVisibility, &b)
&& b) {
*override_state = blink::WebPageVisibilityStateVisible;
return true;
}
return false;
}
void AtomRendererClient::EnableWebRuntimeFeatures() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
bool b;