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

Unified Diff: views/widget/widget_win.cc

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code cleanup Created 9 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
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 {

Powered by Google App Engine
This is Rietveld 408576698