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

Unified Diff: Source/core/html/HTMLPlugInElement.cpp

Issue 809523003: Send NPAPI focus messages when web contents is blurred or focused (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: setFocus call update Created 5 years, 11 months 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
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInElement.cpp
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp
index d57dbf011482ce04e1963674130255f894d2e3bc..59312d7f0b222b36f2af8394e34bee856f0c265c 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -441,6 +441,14 @@ NPObject* HTMLPlugInElement::getNPObject()
return m_NPObject;
}
+void HTMLPlugInElement::setPluginFocus(bool focused)
+{
+ Widget* focusedWidget = existingPluginWidget();
+ // NPAPI flash requires to receive messages when web contents focus changes.
+ if (getNPObject() && focusedWidget)
+ focusedWidget->setFocus(focused, WebFocusTypeNone);
+}
+
bool HTMLPlugInElement::isImageType()
{
if (m_serviceType.isEmpty() && protocolIs(m_url, "data"))
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698