| 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/tracked_objects.h" | 9 #include "base/tracked_objects.h" |
| 10 #include "base/win/metro.h" | 10 #include "base/win/metro.h" |
| 11 #include "base/win/win_util.h" | 11 #include "base/win/win_util.h" |
| 12 #include "ui/gfx/point.h" | 12 #include "ui/gfx/geometry/point.h" |
| 13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Adjust the window to fit. | 20 // Adjust the window to fit. |
| 21 void AdjustWindowToFit(HWND hwnd, const RECT& bounds, bool fit_to_monitor) { | 21 void AdjustWindowToFit(HWND hwnd, const RECT& bounds, bool fit_to_monitor) { |
| 22 if (fit_to_monitor) { | 22 if (fit_to_monitor) { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 HMODULE metro = base::win::GetMetroModule(); | 244 HMODULE metro = base::win::GetMetroModule(); |
| 245 if (!metro) | 245 if (!metro) |
| 246 return get_real_hwnd ? ::GetDesktopWindow() : HWND_DESKTOP; | 246 return get_real_hwnd ? ::GetDesktopWindow() : HWND_DESKTOP; |
| 247 // In windows 8 metro-mode the root window is not the desktop. | 247 // In windows 8 metro-mode the root window is not the desktop. |
| 248 RootWindow root_window = | 248 RootWindow root_window = |
| 249 reinterpret_cast<RootWindow>(::GetProcAddress(metro, "GetRootWindow")); | 249 reinterpret_cast<RootWindow>(::GetProcAddress(metro, "GetRootWindow")); |
| 250 return root_window(); | 250 return root_window(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace gfx | 253 } // namespace gfx |
| OLD | NEW |