Index: views/widget/widget_win.cc |
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc |
index 1fd9dbdbac0dc65cc28093bff4d77f52f9345968..5f14cc9a93501cce41360d96c84a5e451b5bd36b 100644 |
--- a/views/widget/widget_win.cc |
+++ b/views/widget/widget_win.cc |
@@ -4,7 +4,6 @@ |
#include "views/widget/widget_win.h" |
-#include "app/win/win_util.h" |
#include "base/string_util.h" |
#include "gfx/canvas_skia.h" |
#include "gfx/native_theme_win.h" |
@@ -30,6 +29,17 @@ |
using ui::ViewProp; |
+namespace { |
+ |
+// Returns whether the specified window is the current active window. |
+bool IsWindowActive(HWND hwnd) { |
+ WINDOWINFO info; |
+ return ::GetWindowInfo(hwnd, &info) && |
+ ((info.dwWindowStatus & WS_ACTIVECAPTION) != 0); |
+} |
+ |
+} // namespace |
+ |
namespace views { |
// Property used to link the HWND to its RootView. |
@@ -393,7 +403,7 @@ bool WidgetWin::IsVisible() const { |
} |
bool WidgetWin::IsActive() const { |
- return app::win::IsWindowActive(hwnd()); |
+ return IsWindowActive(hwnd()); |
} |
bool WidgetWin::IsAccessibleWidget() const { |