Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3492)

Unified Diff: chrome/renderer/blocked_plugin.cc

Issue 5275007: Add the ability to remove blocked plugin containers from the page. For now,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698