Index: chrome/renderer/blocked_plugin.cc |
=================================================================== |
--- chrome/renderer/blocked_plugin.cc (revision 67280) |
+++ chrome/renderer/blocked_plugin.cc (working copy) |
@@ -68,6 +68,7 @@ |
void BlockedPlugin::BindWebFrame(WebFrame* frame) { |
BindToJavascript(frame, L"plugin"); |
BindMethod("load", &BlockedPlugin::Load); |
+ BindMethod("hide", &BlockedPlugin::Hide); |
} |
void BlockedPlugin::WillDestroyPlugin() { |
@@ -88,6 +89,12 @@ |
LoadPlugin(); |
} |
+void BlockedPlugin::Hide(const CppArgumentList& args, CppVariant* result) { |
+ WebPluginContainer* container = plugin_->container(); |
+ container->element().setAttribute("width", "0"); |
+ container->element().setAttribute("height", "0"); |
Bernhard Bauer
2010/11/29 15:57:54
Is setting the element to 0x0 what we want to do?
|
+} |
+ |
void BlockedPlugin::LoadPlugin() { |
CHECK(plugin_); |
WebPluginContainer* container = plugin_->container(); |