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

Unified Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 2755723002: Fixed an IME bug due to a race in TextInputStateChanged
Patch Set: Using BrowserPlugingEmbedder for determinning focused guests Created 3 years, 9 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
Index: content/browser/browser_plugin/browser_plugin_embedder.cc
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc
index c558b8f9b1f2c44df5f95ffa57e5306a8cad974b..8266cf33cdaf18b558fb305a79e56760226a8ed5 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -223,6 +223,16 @@ bool BrowserPluginEmbedder::WereAnyGuestsRecentlyAudible() {
base::Bind(&BrowserPluginEmbedder::GuestRecentlyAudibleCallback));
}
+bool BrowserPluginEmbedder::AreAnyGuestsFocused() {
+ BrowserPluginGuestManager::GuestCallback callback =
+ base::Bind([](WebContents* guest) {
+ return static_cast<WebContentsImpl*>(guest)
+ ->GetBrowserPluginGuest()
+ ->focused();
+ });
+ return GetBrowserPluginGuestManager()->ForEachGuest(web_contents(), callback);
+}
+
// static
bool BrowserPluginEmbedder::UnlockMouseIfNecessaryCallback(bool* mouse_unlocked,
WebContents* guest) {
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_embedder.h ('k') | content/browser/renderer_host/render_widget_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698