summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/win
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/win
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/win')
-rw-r--r--o3d/plugin/win/main_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index 708e84d..3f8a465 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -47,6 +47,7 @@
#include "core/cross/event.h"
#include "plugin/cross/plugin_logging.h"
#include "plugin/cross/out_of_memory.h"
+#include "plugin/cross/whitelist.h"
#include "statsreport/metrics.h"
#include "v8/include/v8.h"
#include "breakpad/win/bluescreen_detector.h"
@@ -825,6 +826,10 @@ NPError NPP_New(NPMIMEType pluginType,
}
#endif
+ if (!IsDomainAuthorized(instance)) {
+ return NPERR_INVALID_URL;
+ }
+
PluginObject* pluginObject = glue::_o3d::PluginObject::Create(
instance);
instance->pdata = pluginObject;