OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/win/hwnd_util.h" | 5 #include "ui/gfx/win/hwnd_util.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/win/metro.h" | 9 #include "base/win/metro.h" |
10 #include "base/win/win_util.h" | 10 #include "base/win/win_util.h" |
11 #include "ui/gfx/point.h" | 11 #include "ui/gfx/geometry/point.h" |
12 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
13 #include "ui/gfx/size.h" | 13 #include "ui/gfx/size.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // Adjust the window to fit. | 19 // Adjust the window to fit. |
20 void AdjustWindowToFit(HWND hwnd, const RECT& bounds, bool fit_to_monitor) { | 20 void AdjustWindowToFit(HWND hwnd, const RECT& bounds, bool fit_to_monitor) { |
21 if (fit_to_monitor) { | 21 if (fit_to_monitor) { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 HMODULE metro = base::win::GetMetroModule(); | 236 HMODULE metro = base::win::GetMetroModule(); |
237 if (!metro) | 237 if (!metro) |
238 return get_real_hwnd ? ::GetDesktopWindow() : HWND_DESKTOP; | 238 return get_real_hwnd ? ::GetDesktopWindow() : HWND_DESKTOP; |
239 // In windows 8 metro-mode the root window is not the desktop. | 239 // In windows 8 metro-mode the root window is not the desktop. |
240 RootWindow root_window = | 240 RootWindow root_window = |
241 reinterpret_cast<RootWindow>(::GetProcAddress(metro, "GetRootWindow")); | 241 reinterpret_cast<RootWindow>(::GetProcAddress(metro, "GetRootWindow")); |
242 return root_window(); | 242 return root_window(); |
243 } | 243 } |
244 | 244 |
245 } // namespace gfx | 245 } // namespace gfx |
OLD | NEW |