diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 14:53:28 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 14:53:28 +0000 |
commit | 55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28 (patch) | |
tree | 9c283aee59bc21de2843c49eb0bbf03a428cfcfc /ipc/ipc_message_macros.h | |
parent | 904f191f2f7edc9b331e2590c77eb4e8dd845549 (diff) | |
download | chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.zip chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.tar.gz chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.tar.bz2 |
Reland 55888: Allow per-plugin content settings.
Now with Fixed Unit Tests!
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=HostContentSettingsMapTest.*,manual
Review URL: http://codereview.chromium.org/2873104
Review URL: http://codereview.chromium.org/3124018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_macros.h')
-rw-r--r-- | ipc/ipc_message_macros.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index ebfd7c6..39c4e38 100644 --- a/ipc/ipc_message_macros.h +++ b/ipc/ipc_message_macros.h @@ -113,6 +113,7 @@ #undef IPC_SYNC_MESSAGE_CONTROL3_1 #undef IPC_SYNC_MESSAGE_CONTROL3_2 #undef IPC_SYNC_MESSAGE_CONTROL3_3 +#undef IPC_SYNC_MESSAGE_CONTROL3_4 #undef IPC_SYNC_MESSAGE_CONTROL4_1 #undef IPC_SYNC_MESSAGE_CONTROL4_2 #undef IPC_SYNC_MESSAGE_ROUTED0_0 @@ -235,6 +236,9 @@ #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out) \ msg_class##__ID, +#define IPC_SYNC_MESSAGE_CONTROL3_4(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out, type4_out) \ + msg_class##__ID, + #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out) \ msg_class##__ID, @@ -430,6 +434,7 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \ #undef IPC_SYNC_MESSAGE_CONTROL3_1 #undef IPC_SYNC_MESSAGE_CONTROL3_2 #undef IPC_SYNC_MESSAGE_CONTROL3_3 +#undef IPC_SYNC_MESSAGE_CONTROL3_4 #undef IPC_SYNC_MESSAGE_CONTROL4_1 #undef IPC_SYNC_MESSAGE_CONTROL4_2 #undef IPC_SYNC_MESSAGE_ROUTED0_0 @@ -576,6 +581,9 @@ LogFunction g_log_function_mapping[LastMsgIndex]; #define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out) \ IPC_MESSAGE_LOG(msg_class) +#define IPC_SYNC_MESSAGE_CONTROL3_4(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out, type4_out) \ + IPC_MESSAGE_LOG(msg_class) + #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out) \ IPC_MESSAGE_LOG(msg_class) @@ -691,6 +699,7 @@ LogFunction g_log_function_mapping[LastMsgIndex]; #undef IPC_SYNC_MESSAGE_CONTROL3_1 #undef IPC_SYNC_MESSAGE_CONTROL3_2 #undef IPC_SYNC_MESSAGE_CONTROL3_3 +#undef IPC_SYNC_MESSAGE_CONTROL3_4 #undef IPC_SYNC_MESSAGE_CONTROL4_1 #undef IPC_SYNC_MESSAGE_CONTROL4_2 #undef IPC_SYNC_MESSAGE_ROUTED0_0 @@ -998,6 +1007,17 @@ LogFunction g_log_function_mapping[LastMsgIndex]; static void Log(const Message* msg, std::string* l); \ }; +#define IPC_SYNC_MESSAGE_CONTROL3_4(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out, type4_out) \ + class msg_class : \ + public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \ + Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> > { \ + public: \ + enum { ID = msg_class##__ID }; \ + msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6, type4_out* arg7); \ + ~msg_class(); \ + static void Log(const Message* msg, std::string* l); \ + }; + #define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out) \ class msg_class : \ public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \ |