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

Unified Diff: ui/gfx/win/hwnd_util.cc

Issue 1581473002: Remove base/win/metro.{cc|h} and some associated code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 4 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: ui/gfx/win/hwnd_util.cc
diff --git a/ui/gfx/win/hwnd_util.cc b/ui/gfx/win/hwnd_util.cc
index f02a3128c133d0d2cbd9f8ba953f315cced4546f..32ee20143e96be1e47647db29d87f8da755ed73b 100644
--- a/ui/gfx/win/hwnd_util.cc
+++ b/ui/gfx/win/hwnd_util.cc
@@ -6,7 +6,6 @@
#include "base/i18n/rtl.h"
#include "base/strings/string_util.h"
-#include "base/win/metro.h"
#include "base/win/win_util.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
@@ -215,9 +214,6 @@ void ShowSystemMenu(HWND window) {
}
void ShowSystemMenuAtPoint(HWND window, const Point& point) {
- // In the Metro process, we never want to show the system menu.
- if (base::win::IsMetroProcess())
- return;
UINT flags = TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD;
if (base::i18n::IsRTL())
flags |= TPM_RIGHTALIGN;
@@ -235,13 +231,7 @@ extern "C" {
}
HWND GetWindowToParentTo(bool get_real_hwnd) {
- HMODULE metro = base::win::GetMetroModule();
- if (!metro)
- return get_real_hwnd ? ::GetDesktopWindow() : HWND_DESKTOP;
- // In windows 8 metro-mode the root window is not the desktop.
- RootWindow root_window =
- reinterpret_cast<RootWindow>(::GetProcAddress(metro, "GetRootWindow"));
- return root_window();
+ return get_real_hwnd ? ::GetDesktopWindow() : HWND_DESKTOP;
}
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698