Commit 9d4e3bf5 authored by cevans@chromium.org's avatar cevans@chromium.org

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