summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/win/windows_version.cc19
-rw-r--r--base/win/windows_version.h2
-rw-r--r--chrome/browser/ui/tabs/dock_info_win.cc10
-rw-r--r--chrome/browser/ui/webui/flash_ui.cc1
4 files changed, 26 insertions, 6 deletions
diff --git a/base/win/windows_version.cc b/base/win/windows_version.cc
index 5779074..3b280ce 100644
--- a/base/win/windows_version.cc
+++ b/base/win/windows_version.cc
@@ -39,12 +39,23 @@ OSInfo::OSInfo()
if ((version_number_.major == 5) && (version_number_.minor > 0)) {
version_ = (version_number_.minor == 1) ? VERSION_XP : VERSION_SERVER_2003;
} else if (version_number_.major == 6) {
- if (version_info.wProductType == VER_NT_WORKSTATION)
- version_ = (version_number_.minor == 0) ? VERSION_VISTA : VERSION_WIN7;
- else
+ if (version_info.wProductType == VER_NT_WORKSTATION) {
+ switch (version_number_.minor) {
+ case 0:
+ version_ = VERSION_VISTA;
+ break;
+ case 1:
+ version_ = VERSION_WIN7;
+ break;
+ default: // case 2 appears to be win8.
+ version_ = VERSION_WIN8;
+ }
+ } else {
version_ = VERSION_SERVER_2008;
+ }
} else if (version_number_.major > 6) {
- version_ = VERSION_WIN7;
+ NOTREACHED();
+ version_ = VERSION_WIN_LAST;
}
service_pack_.major = version_info.wServicePackMajor;
service_pack_.minor = version_info.wServicePackMinor;
diff --git a/base/win/windows_version.h b/base/win/windows_version.h
index 920438b..1061b47 100644
--- a/base/win/windows_version.h
+++ b/base/win/windows_version.h
@@ -25,6 +25,8 @@ enum Version {
VERSION_VISTA,
VERSION_SERVER_2008,
VERSION_WIN7,
+ VERSION_WIN8,
+ VERSION_WIN_LAST, // Indicates error condition.
};
// A singleton that can be used to query various pieces of information about the
diff --git a/chrome/browser/ui/tabs/dock_info_win.cc b/chrome/browser/ui/tabs/dock_info_win.cc
index 776a772..3c39e91 100644
--- a/chrome/browser/ui/tabs/dock_info_win.cc
+++ b/chrome/browser/ui/tabs/dock_info_win.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/tabs/dock_info.h"
#include "base/win/scoped_gdi_object.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
@@ -146,9 +147,14 @@ class LocalProcessWindowFinder : public BaseWindowFinder {
static HWND GetProcessWindowAtPoint(const gfx::Point& screen_loc,
const std::set<HWND>& ignore) {
LocalProcessWindowFinder finder(screen_loc, ignore);
+ // Windows 8 has a window that appears first in the list of iterated
+ // windows, yet is not visually on top of everything.
+ // TODO(sky): figure out a better way to ignore this window.
if (finder.result_ &&
- TopMostFinder::IsTopMostWindowAtPoint(finder.result_, screen_loc,
- ignore)) {
+ ((base::win::OSInfo::GetInstance()->version() >=
+ base::win::VERSION_WIN8) ||
+ TopMostFinder::IsTopMostWindowAtPoint(finder.result_, screen_loc,
+ ignore))) {
return finder.result_;
}
return NULL;
diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc
index f69bc77..6b3ca634 100644
--- a/chrome/browser/ui/webui/flash_ui.cc
+++ b/chrome/browser/ui/webui/flash_ui.cc
@@ -212,6 +212,7 @@ void FlashDOMHandler::MaybeRespondToPage() {
case base::win::VERSION_VISTA: os_label += " Vista"; break;
case base::win::VERSION_SERVER_2008: os_label += " Server 2008"; break;
case base::win::VERSION_WIN7: os_label += " 7"; break;
+ case base::win::VERSION_WIN8: os_label += " 8"; break;
default: os_label += " UNKNOWN"; break;
}
os_label += " SP" + base::IntToString(os->service_pack().major);