mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Remove pageVisibility option
The original purpose of this option is not working anymore, also adds docs on the current way to disable process backgrounding.
This commit is contained in:
@@ -34,8 +34,6 @@ FeaturePair kWebRuntimeFeatures[] = {
|
||||
switches::kExperimentalFeatures },
|
||||
{ options::kExperimentalCanvasFeatures,
|
||||
switches::kExperimentalCanvasFeatures },
|
||||
{ options::kPageVisibility,
|
||||
switches::kPageVisibility },
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -85,9 +85,6 @@ const char kNodeIntegration[] = "nodeIntegration";
|
||||
// Instancd ID of guest WebContents.
|
||||
const char kGuestInstanceID[] = "guestInstanceId";
|
||||
|
||||
// Set page visiblity to always visible.
|
||||
const char kPageVisibility[] = "pageVisibility";
|
||||
|
||||
// Enable DirectWrite on Windows.
|
||||
const char kDirectWrite[] = "directWrite";
|
||||
|
||||
@@ -141,7 +138,6 @@ const char kNodeIntegration[] = "node-integration";
|
||||
const char kGuestInstanceID[] = "guest-instance-id";
|
||||
const char kExperimentalFeatures[] = "experimental-features";
|
||||
const char kExperimentalCanvasFeatures[] = "experimental-canvas-features";
|
||||
const char kPageVisibility[] = "page-visiblity";
|
||||
const char kOpenerID[] = "opener-id";
|
||||
|
||||
// Widevine options
|
||||
|
||||
@@ -49,7 +49,6 @@ extern const char kNodeIntegration[];
|
||||
extern const char kGuestInstanceID[];
|
||||
extern const char kExperimentalFeatures[];
|
||||
extern const char kExperimentalCanvasFeatures[];
|
||||
extern const char kPageVisibility[];
|
||||
extern const char kOpenerID[];
|
||||
|
||||
} // namespace options
|
||||
@@ -77,7 +76,6 @@ extern const char kNodeIntegration[];
|
||||
extern const char kGuestInstanceID[];
|
||||
extern const char kExperimentalFeatures[];
|
||||
extern const char kExperimentalCanvasFeatures[];
|
||||
extern const char kPageVisibility[];
|
||||
extern const char kOpenerID[];
|
||||
|
||||
extern const char kWidevineCdmPath[];
|
||||
|
||||
@@ -210,19 +210,6 @@ content::BrowserPluginDelegate* AtomRendererClient::CreateBrowserPluginDelegate(
|
||||
}
|
||||
}
|
||||
|
||||
bool AtomRendererClient::ShouldOverridePageVisibilityState(
|
||||
const content::RenderFrame* render_frame,
|
||||
blink::WebPageVisibilityState* override_state) {
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
if (IsSwitchEnabled(command_line, switches::kPageVisibility)) {
|
||||
*override_state = blink::WebPageVisibilityStateVisible;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void AtomRendererClient::EnableWebRuntimeFeatures() {
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
|
||||
@@ -56,9 +56,6 @@ class AtomRendererClient : public content::ContentRendererClient,
|
||||
content::RenderFrame* render_frame,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) override;
|
||||
bool ShouldOverridePageVisibilityState(
|
||||
const content::RenderFrame* render_frame,
|
||||
blink::WebPageVisibilityState* override_state) override;
|
||||
void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) override;
|
||||
|
||||
void EnableWebRuntimeFeatures();
|
||||
|
||||
Reference in New Issue
Block a user