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

Side by Side 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: Const not OK for Mac build. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/layout.h ('k') | ui/base/resource/resource_bundle_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "base/win/metro.h"
12 #include <Windows.h>
13 #endif // defined(OS_WIN)
14
15 namespace ui {
16
17 // Note that this function should be extended to select
18 // LAYOUT_TOUCH when appropriate on more platforms than just
19 // Windows.
20 DisplayLayout GetDisplayLayout() {
21 #if defined(USE_ASH)
22 return LAYOUT_ASH;
23 #elif !defined(OS_WIN)
24 return LAYOUT_DESKTOP;
25 #else // On Windows.
26 bool use_touch = false;
27 #if defined(ENABLE_METRO)
28 use_touch = base::win::GetMetroModule() != NULL;
29 #endif // defined(ENABLE_METRO)
30 if (use_touch) {
31 return LAYOUT_TOUCH;
32 } else {
33 return LAYOUT_DESKTOP;
34 }
35 #endif // On Windows.
36 }
37
38 } // namespace ui
OLDNEW
« 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