| Index: ui/base/layout.cc
|
| diff --git a/ui/base/layout.cc b/ui/base/layout.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6081e6674848057e9703b5b339bcf6b70186daac
|
| --- /dev/null
|
| +++ b/ui/base/layout.cc
|
| @@ -0,0 +1,35 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/base/layout.h"
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "build/build_config.h"
|
| +
|
| +#if defined(OS_WIN)
|
| +#include "ui/base/win/metro.h"
|
| +#include <Windows.h>
|
| +#endif // defined(OS_WIN)
|
| +
|
| +namespace ui {
|
| +
|
| +const DisplayLayout GetDisplayLayout() {
|
| +#if defined(USE_ASH)
|
| + return LAYOUT_ASH;
|
| +#elif !defined(OS_WIN)
|
| + return LAYOUT_DESKTOP;
|
| +#else // On Windows.
|
| + bool use_metro = false;
|
| +#if defined(ENABLE_METRO)
|
| + use_metro = ui::IsInMetroMode();
|
| +#endif // defined(ENABLE_METRO)
|
| + if (use_metro) {
|
| + return LAYOUT_METRO;
|
| + } else {
|
| + return LAYOUT_DESKTOP;
|
| + }
|
| +#endif // On Windows.
|
| +}
|
| +
|
| +} // namespace ui
|
|
|