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

Unified Diff: ui/base/win/window_impl.cc

Issue 10270029: Fullscreen can't use the desktop as a parent in metro mode (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « ui/base/win/hwnd_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/window_impl.cc
===================================================================
--- ui/base/win/window_impl.cc (revision 134777)
+++ ui/base/win/window_impl.cc (working copy)
@@ -12,29 +12,6 @@
#include "base/win/wrapped_window_proc.h"
#include "ui/base/win/hwnd_util.h"
-namespace {
-
-extern "C" {
- typedef HWND (*GetRootWindow)();
-}
-
-HMODULE GetMetroDll() {
- static HMODULE hm = ::GetModuleHandleA("metro_driver.dll");
- return hm;
-}
-
-HWND RootWindow(bool is_child_window) {
- HMODULE metro = GetMetroDll();
- if (!metro) {
- return is_child_window ? ::GetDesktopWindow() : HWND_DESKTOP;
- }
- GetRootWindow get_root_window =
- reinterpret_cast<GetRootWindow>(::GetProcAddress(metro, "GetRootWindow"));
- return get_root_window();
-}
-
-} // namespace
-
namespace ui {
static const DWORD kWindowDefaultChildStyle =
@@ -164,10 +141,10 @@
if (parent == HWND_DESKTOP) {
// Only non-child windows can have HWND_DESKTOP (0) as their parent.
CHECK((window_style_ & WS_CHILD) == 0);
- parent = RootWindow(false);
+ parent = GetWindowToParentTo(false);
} else if (parent == ::GetDesktopWindow()) {
// Any type of window can have the "Desktop Window" as their parent.
- parent = RootWindow(true);
+ parent = GetWindowToParentTo(true);
} else if (parent != HWND_MESSAGE) {
CHECK(::IsWindow(parent));
}
« no previous file with comments | « ui/base/win/hwnd_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698