summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/plugin_thread.cc5
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc8
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h1
3 files changed, 11 insertions, 3 deletions
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index fb02ac5..0a9ef12 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -149,14 +149,15 @@ void PluginThread::OnPluginMessage(const std::vector<unsigned char> &data) {
#if defined(OS_MACOSX)
void PluginThread::OnPluginFocusNotify(uint32 instance_id) {
- WebPluginDelegateImpl* instance =
+ WebPluginDelegateImpl* focused_instance =
reinterpret_cast<WebPluginDelegateImpl*>(instance_id);
std::set<WebPluginDelegateImpl*> active_delegates =
WebPluginDelegateImpl::GetActiveDelegates();
for (std::set<WebPluginDelegateImpl*>::iterator iter =
active_delegates.begin();
iter != active_delegates.end(); iter++) {
- (*iter)->FocusNotify(instance);
+ WebPluginDelegateImpl* instance = *iter;
+ instance->FocusChanged(instance == focused_instance);
}
}
#endif
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index 253d7cf..cf6e842 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -123,6 +123,8 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
OnSendJavaScriptStream)
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(PluginMsg_SetWindowFocus, OnSetWindowFocus)
+ IPC_MESSAGE_HANDLER(PluginMsg_SetContainerVisibility,
+ OnSetContainerVisibility)
#endif
IPC_MESSAGE_HANDLER(PluginMsg_DidReceiveManualResponse,
OnDidReceiveManualResponse)
@@ -338,7 +340,11 @@ void WebPluginDelegateStub::OnSendJavaScriptStream(const GURL& url,
void WebPluginDelegateStub::OnSetWindowFocus(bool has_focus) {
delegate_->SetWindowHasFocus(has_focus);
}
-#endif
+
+void WebPluginDelegateStub::OnSetContainerVisibility(bool is_visible) {
+ delegate_->SetContainerVisibility(is_visible);
+}
+#endif // OS_MACOSX
void WebPluginDelegateStub::OnDidReceiveManualResponse(
const GURL& url,
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index 5728fdd..b783832 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -80,6 +80,7 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
#if defined(OS_MACOSX)
void OnSetWindowFocus(bool has_focus);
+ void OnSetContainerVisibility(bool is_visible);
#endif
void OnDidReceiveManualResponse(