| Index: content/renderer/pepper/plugin_power_saver_helper.h
|
| diff --git a/content/renderer/pepper/plugin_power_saver_helper.h b/content/renderer/pepper/plugin_power_saver_helper.h
|
| index 70a435a2d175f739db1e3abf00af61d07cc1793f..0410815713d322dadc913e9e458a4eeddf30e705 100644
|
| --- a/content/renderer/pepper/plugin_power_saver_helper.h
|
| +++ b/content/renderer/pepper/plugin_power_saver_helper.h
|
| @@ -11,7 +11,7 @@
|
| #include "base/callback.h"
|
| #include "content/common/content_export.h"
|
| #include "content/public/renderer/render_frame_observer.h"
|
| -#include "url/gurl.h"
|
| +#include "url/origin.h"
|
|
|
| namespace blink {
|
| struct WebPluginParams;
|
| @@ -26,7 +26,7 @@ class CONTENT_EXPORT PluginPowerSaverHelper : public RenderFrameObserver {
|
| ~PluginPowerSaverHelper() override;
|
|
|
| // See RenderFrame for documentation.
|
| - void RegisterPeripheralPlugin(const GURL& content_origin,
|
| + void RegisterPeripheralPlugin(const url::Origin& content_origin,
|
| const base::Closure& unthrottle_callback);
|
|
|
| // Returns true if this plugin should have power saver enabled.
|
| @@ -46,7 +46,7 @@ class CONTENT_EXPORT PluginPowerSaverHelper : public RenderFrameObserver {
|
| //
|
| // |cross_origin_main_content| may be NULL. It is set to true if the
|
| // plugin content is cross-origin but still the "main attraction" of the page.
|
| - bool ShouldThrottleContent(const GURL& content_origin,
|
| + bool ShouldThrottleContent(const url::Origin& content_origin,
|
| const std::string& plugin_module_name,
|
| int width,
|
| int height,
|
| @@ -54,15 +54,15 @@ class CONTENT_EXPORT PluginPowerSaverHelper : public RenderFrameObserver {
|
|
|
| // Whitelists a |content_origin| so its content will never be throttled in
|
| // this RenderFrame. Whitelist is cleared by top level navigation.
|
| - void WhitelistContentOrigin(const GURL& content_origin);
|
| + void WhitelistContentOrigin(const url::Origin& content_origin);
|
|
|
| private:
|
| struct PeripheralPlugin {
|
| - PeripheralPlugin(const GURL& content_origin,
|
| + PeripheralPlugin(const url::Origin& content_origin,
|
| const base::Closure& unthrottle_callback);
|
| ~PeripheralPlugin();
|
|
|
| - GURL content_origin;
|
| + url::Origin content_origin;
|
| base::Closure unthrottle_callback;
|
| };
|
|
|
| @@ -79,12 +79,12 @@ class CONTENT_EXPORT PluginPowerSaverHelper : public RenderFrameObserver {
|
| bool OnMessageReceived(const IPC::Message& message) override;
|
|
|
| void OnUpdatePluginContentOriginWhitelist(
|
| - const std::set<GURL>& origin_whitelist);
|
| + const std::set<url::Origin>& origin_whitelist);
|
|
|
| OverrideForTesting override_for_testing_;
|
|
|
| // Local copy of the whitelist for the entire tab.
|
| - std::set<GURL> origin_whitelist_;
|
| + std::set<url::Origin> origin_whitelist_;
|
|
|
| // Set of peripheral plugins eligible to be unthrottled ex post facto.
|
| std::vector<PeripheralPlugin> peripheral_plugins_;
|
|
|