Skip to content
Snippets Groups Projects
Commit 9d4e3bf5 authored by cevans@chromium.org's avatar cevans@chromium.org
Browse files

Add an "x" to remove the blocked plug-in placeholder. The feature already

exists in the context menu, but now it works well enough to promote to the
main placeholder UI.


BUG=63695
TEST=see bug

Review URL: http://codereview.chromium.org/5275007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71528 0039d316-1c4b-4281-b951-d872f2087c98
parent b9a59849
No related merge requests found
......@@ -83,6 +83,7 @@ BlockedPlugin::~BlockedPlugin() {
void BlockedPlugin::BindWebFrame(WebFrame* frame) {
BindToJavascript(frame, "plugin");
BindMethod("load", &BlockedPlugin::Load);
BindMethod("hide", &BlockedPlugin::Hide);
}
void BlockedPlugin::WillDestroyPlugin() {
......@@ -150,6 +151,10 @@ void BlockedPlugin::Load(const CppArgumentList& args, CppVariant* result) {
LoadPlugin();
}
void BlockedPlugin::Hide(const CppArgumentList& args, CppVariant* result) {
HidePlugin();
}
void BlockedPlugin::HidePlugin() {
CHECK(plugin_);
WebPluginContainer* container = plugin_->container();
......
......@@ -50,10 +50,14 @@ class BlockedPlugin : public CppBoundClass,
virtual ~BlockedPlugin();
// Javascript callbacks:
// Load the blocked plugin by calling LoadPlugin() below.
// Load the blocked plugin by calling LoadPlugin().
// Takes no arguments, and returns nothing.
void Load(const CppArgumentList& args, CppVariant* result);
// Hide the blocked plugin by calling HidePlugin().
// Takes no arguments, and returns nothing.
void Hide(const CppArgumentList& args, CppVariant* result);
// Hide the blocked plugin.
void HidePlugin();
......
......@@ -22,7 +22,7 @@ h1 {
visibility: hidden;
}
#outer:hover h1 {
#outer:hover h1, #outer:hover img {
visibility: visible;
}
......@@ -48,6 +48,14 @@ p {
top: 50%;
margin-top: -70px;
}
#close {
visibility: hidden;
cursor: pointer;
position: absolute;
right: 0px;
top: 0px;
}
</style>
</head>
......@@ -58,6 +66,7 @@ p {
<h1 i18n-content="message">PLUGIN_BLOCKED</h1>
<p id="debug"> </p>
</div>
<img id="close" onclick="plugin.hide();" src="../../app/theme/close_bar_h.png">
</div>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment