summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/plugin.gyp
diff options
context:
space:
mode:
authortschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 22:01:54 +0000
committertschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 22:01:54 +0000
commit78c7977d2fc51cb7b24f1eb69e1bce64b71cb51a (patch)
tree6175aad4900e5d8cecff970711c5c58dd436e44a /o3d/plugin/plugin.gyp
parentf6ee0a018e7b1f4ff5e63da7e8c388041acad2c3 (diff)
downloadchromium_src-78c7977d2fc51cb7b24f1eb69e1bce64b71cb51a.zip
chromium_src-78c7977d2fc51cb7b24f1eb69e1bce64b71cb51a.tar.gz
chromium_src-78c7977d2fc51cb7b24f1eb69e1bce64b71cb51a.tar.bz2
Introduce two new GYP variables:
1) plugin_domain_whitelist, which sets an optional domain whitelist. If specified, websites not in the list can't use the plugin. 2) plugin_enable_fullscreen_msg, which can be optionally unset to disable the Win/Mac fullscreen message. Also fix a bug in NPPluginProxy that this uncovered. TEST=built on Windows with a whitelist and without fullscreen message and verified correct behaviour in both IE and FF. Also, the whitelist logic comes almost verbatim from another Google product where it is already well-tested BUG=none Review URL: http://codereview.chromium.org/668078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40786 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin/plugin.gyp')
-rw-r--r--o3d/plugin/plugin.gyp23
1 files changed, 23 insertions, 0 deletions
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp
index 7caf52b..8fdb21f 100644
--- a/o3d/plugin/plugin.gyp
+++ b/o3d/plugin/plugin.gyp
@@ -40,6 +40,7 @@
'cross/stream_manager.cc',
'cross/stream_manager.h',
'cross/texture_static_glue.cc',
+ 'cross/whitelist.cc',
],
'plugin_depends': [
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
@@ -55,6 +56,10 @@
'../../native_client/src/shared/imc/imc.gyp:google_nacl_imc',
'idl/idl.gyp:o3dPluginIdl',
],
+ # A comma-separated list of strings, each double-quoted.
+ 'plugin_domain_whitelist%': '',
+ # Whether to enable the English-only, Win/Mac-only fullscreen message.
+ 'plugin_enable_fullscreen_msg%': '1',
},
'includes': [
'../build/common.gypi',
@@ -76,6 +81,24 @@
'O3D_PLUGIN_VENDOR_DIRECTORY="<(plugin_vendor_directory)"',
'O3D_PLUGIN_PRODUCT_DIRECTORY="<(plugin_product_directory)"',
],
+ 'conditions': [
+ # The funky quoting here is so that GYP doesn't shoot itself in the foot
+ # when expanding a quoted variable which itself contains quotes.
+ ["""'<(plugin_domain_whitelist)' != ''""",
+ {
+ 'defines': [
+ 'O3D_PLUGIN_DOMAIN_WHITELIST=<(plugin_domain_whitelist)',
+ ],
+ },
+ ],
+ ['<(plugin_enable_fullscreen_msg) != 0',
+ {
+ 'defines': [
+ 'O3D_PLUGIN_ENABLE_FULLSCREEN_MSG=1',
+ ],
+ },
+ ],
+ ],
},
'targets': [
{