| Index: chrome/renderer/content_settings_observer.h
|
| diff --git a/chrome/renderer/content_settings_observer.h b/chrome/renderer/content_settings_observer.h
|
| index 3055caa878e08290648a2cdcdcf2423aeac55fa1..e700dc6bdaf01e48e2835c8e9d26927833b1de57 100644
|
| --- a/chrome/renderer/content_settings_observer.h
|
| +++ b/chrome/renderer/content_settings_observer.h
|
| @@ -34,11 +34,12 @@ class ContentSettingsObserver
|
| // allowPlugins().
|
| static void SetDefaultContentSettings(const ContentSettings& settings);
|
|
|
| - // Sets the image setting rules which back |allowImage()|. The
|
| - // |ContentSettingsForOneType| object must outlive this
|
| + // Sets the content setting rules which back |AllowImage()| and
|
| + // |AllowScriptFromSource()|. |content_setting_rules| must be an array
|
| + // indexable with |ContentSettingsType| and it must outlive this
|
| // |ContentSettingsObserver|.
|
| - void SetImageSettingRules(
|
| - const ContentSettingsForOneType* image_setting_rules);
|
| + void SetContentSettingRules(
|
| + const ContentSettingsForOneType* content_setting_rules);
|
|
|
| // Returns the setting for the given type.
|
| ContentSetting GetContentSetting(ContentSettingsType type);
|
| @@ -68,6 +69,8 @@ class ContentSettingsObserver
|
| const WebKit::WebSecurityOrigin& origin);
|
| bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings);
|
| bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings);
|
| + bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings,
|
| + const WebKit::WebURL& script_url);
|
| bool AllowStorage(WebKit::WebFrame* frame, bool local);
|
| void DidNotAllowPlugins(WebKit::WebFrame* frame);
|
| void DidNotAllowScript(WebKit::WebFrame* frame);
|
| @@ -101,10 +104,10 @@ class ContentSettingsObserver
|
| // Stores if loading of scripts and plugins is allowed.
|
| ContentSettings current_content_settings_;
|
|
|
| - // Stores the rules for image content settings. Normally, they are owned by
|
| - // |ChromeRenderProcessObserver|; in the tests they are owned by the caller of
|
| - // |SetImageSettingRules|.
|
| - const ContentSettingsForOneType* image_setting_rules_;
|
| + // A pointer to content setting rules for image and script content
|
| + // types. Normally, they are owned by |ChromeRenderProcessObserver|; in the
|
| + // tests they are owned by the caller of |SetImageSettingRules|.
|
| + const ContentSettingsForOneType* content_setting_rules_;
|
|
|
| // Stores if images, scripts, and plugins have actually been blocked.
|
| bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES];
|
|
|