Index: chromecast/graphics/cast_focus_client_aura.cc |
diff --git a/chromecast/graphics/cast_focus_client_aura.cc b/chromecast/graphics/cast_focus_client_aura.cc |
index 50881616ebcfa88e20ac2c05d9fd01425b3402ee..fb339d10e84de3ce869b11d89dc3a8eebb0c1655 100644 |
--- a/chromecast/graphics/cast_focus_client_aura.cc |
+++ b/chromecast/graphics/cast_focus_client_aura.cc |
@@ -4,6 +4,7 @@ |
#include "chromecast/graphics/cast_focus_client_aura.h" |
+#include "base/stl_util.h" |
#include "ui/aura/window.h" |
#define LOG_WINDOW_INFO(top_level, window) \ |
@@ -124,9 +125,7 @@ void CastFocusClientAura::FocusWindow(aura::Window* window) { |
aura::Window* top_level = GetZOrderWindow(window); |
DCHECK(top_level); |
DLOG(INFO) << "Requesting focus for " << LOG_WINDOW_INFO(top_level, window); |
- auto iter = |
- std::find(focusable_windows_.begin(), focusable_windows_.end(), window); |
- if (iter == focusable_windows_.end()) { |
+ if (!base::ContainsValue(focusable_windows_, window)) { |
// We're not yet tracking this focusable window, so start tracking it as a |
// potential focus target. |
window->AddObserver(this); |