OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/base/layout.h" |
| 6 |
| 7 #include "base/basictypes.h" |
| 8 #include "build/build_config.h" |
| 9 |
| 10 #if defined(OS_WIN) |
| 11 #include "ui/base/win/metro.h" |
| 12 #include <Windows.h> |
| 13 #endif // defined(OS_WIN) |
| 14 |
| 15 namespace ui { |
| 16 |
| 17 const DisplayLayout GetDisplayLayout() { |
| 18 #if defined(USE_ASH) |
| 19 return LAYOUT_ASH; |
| 20 #elif !defined(OS_WIN) |
| 21 return LAYOUT_DESKTOP; |
| 22 #else // On Windows. |
| 23 bool use_metro = false; |
| 24 #if defined(ENABLE_METRO) |
| 25 use_metro = ui::IsInMetroMode(); |
| 26 #endif // defined(ENABLE_METRO) |
| 27 if (use_metro) { |
| 28 return LAYOUT_METRO; |
| 29 } else { |
| 30 return LAYOUT_DESKTOP; |
| 31 } |
| 32 #endif // On Windows. |
| 33 } |
| 34 |
| 35 } // namespace ui |
OLD | NEW |