summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages_internal.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 15:36:59 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 15:36:59 +0000
commite1796d57db05121ddd7fbf913a276fc52ec75008 (patch)
tree03a1b658285e58f29af4aeb1521b42a6ad62bd5c /chrome/common/render_messages_internal.h
parent670a9a2182a6b344a873bd0b86be61b1ea67febc (diff)
downloadchromium_src-e1796d57db05121ddd7fbf913a276fc52ec75008.zip
chromium_src-e1796d57db05121ddd7fbf913a276fc52ec75008.tar.gz
chromium_src-e1796d57db05121ddd7fbf913a276fc52ec75008.tar.bz2
Allow per-plugin content settings.
Run with --enable-resource-content-settings and --enable-click-to-play to enable. TabSpecificContentSettings now keeps track of which resources were blocked. The content setting bubble displays those resource, and selecting the "allow radio buttons adds exceptions for these resources. The infobar for non-sandboxed plug-ins now also shows a button to always allow the blocked plug-in on that site. Screenshot of the plugin bubble: http://imgur.com/6npqv.png Because we need to change the title and radio button labels depending on whether we track specific plug-ins, we copy them from the ContentSettingBubbleModel. XIB changes: Add a text field for the blocked plug-ins to ContentBlockedPlugins.xib, hooked up to the |blockedResourcesField_| outlet. BUG=39252,38432 TEST=manual Review URL: http://codereview.chromium.org/2873104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages_internal.h')
-rw-r--r--chrome/common/render_messages_internal.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 7eb594d..68df701 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -1268,12 +1268,23 @@ IPC_BEGIN_MESSAGES(ViewHost)
// Return information about a plugin for the given URL and MIME type. If there
// is no matching plugin, |found| is set to false.
- IPC_SYNC_MESSAGE_CONTROL3_3(ViewHostMsg_GetPluginInfo,
+ // If |enabled| in the WebPluginInfo struct is false, the plug-in is basically
+ // treated as if it was not installed at all.
+ // If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is blocked by the
+ // content settings for |policy_url|. It still appears in navigator.plugins in
+ // Javascript though, and can be loaded via click-to-play.
+ // If |setting| is set to CONTENT_SETTING_ALLOW, the domain is explicitly
+ // white-listed for the plug-in.
+ // If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is neither
+ // blocked nor white-listed, which means that it's allowed by default and
+ // can still be blocked if it's non-sandboxed.
+ IPC_SYNC_MESSAGE_CONTROL3_4(ViewHostMsg_GetPluginInfo,
GURL /* url */,
GURL /* policy_url */,
std::string /* mime_type */,
bool /* found */,
WebPluginInfo /* plugin info */,
+ ContentSetting /* setting */,
std::string /* actual_mime_type */)
// Requests spellcheck for a word.
@@ -1304,8 +1315,9 @@ IPC_BEGIN_MESSAGES(ViewHost)
// Tells the browser that content in the current page was blocked due to the
// user's content settings.
- IPC_MESSAGE_ROUTED1(ViewHostMsg_ContentBlocked,
- ContentSettingsType /* type of blocked content */)
+ IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
+ ContentSettingsType, /* type of blocked content */
+ std::string /* resource identifier */)
// Tells the browser that a specific Appcache manifest in the current page
// was accessed.
@@ -1693,7 +1705,8 @@ IPC_BEGIN_MESSAGES(ViewHost)
int /* status */)
// Notifies when a non-sandboxed plugin was blocked.
- IPC_MESSAGE_ROUTED1(ViewHostMsg_NonSandboxedPluginBlocked,
+ IPC_MESSAGE_ROUTED2(ViewHostMsg_NonSandboxedPluginBlocked,
+ std::string /* plugin */,
string16 /* name */)
// Notifies when a blocked plugin was loaded via click-to-load.