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

Unified Diff: ui/base/layout.cc

Issue 10115029: Set toolbar padding to something appropriate for Metro icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve comment as requested. 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/layout.h ('k') | ui/base/resource/resource_bundle_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/base/layout.h ('k') | ui/base/resource/resource_bundle_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698