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

Side by Side Diff: ui/base/layout.cc

Issue 10440037: Remove the enable_metro GYP flag, effectively making it on by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
OLDNEW
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/base/layout.h" 5 #include "ui/base/layout.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 23 matching lines...) Expand all
34 if (switch_value.empty() || 34 if (switch_value.empty() ||
35 switch_value == switches::kTouchOptimizedUIEnabled) { 35 switch_value == switches::kTouchOptimizedUIEnabled) {
36 return true; 36 return true;
37 } else if (switch_value == switches::kTouchOptimizedUIDisabled) { 37 } else if (switch_value == switches::kTouchOptimizedUIDisabled) {
38 return false; 38 return false;
39 } else if (switch_value != switches::kTouchOptimizedUIAuto) { 39 } else if (switch_value != switches::kTouchOptimizedUIAuto) {
40 LOG(ERROR) << "Invalid --touch-optimized-ui option: " << switch_value; 40 LOG(ERROR) << "Invalid --touch-optimized-ui option: " << switch_value;
41 } 41 }
42 } 42 }
43 43
44 #if defined(ENABLE_METRO) 44 #if defined(OS_WIN)
45 // On Windows, we use the touch layout only when we are running in
46 // Metro mode.
45 return base::win::GetMetroModule() != NULL; 47 return base::win::GetMetroModule() != NULL;
46 #elif defined(OS_WIN)
47 // No touch support on Win outside Metro yet (even with Aura).
48 return false;
49 #elif defined(USE_AURA) && defined(USE_X11) 48 #elif defined(USE_AURA) && defined(USE_X11)
50 // Determine whether touch-screen hardware is currently available. 49 // Determine whether touch-screen hardware is currently available.
51 // For now we assume this won't change over the life of the process, but 50 // For now we assume this won't change over the life of the process, but
52 // we'll probably want to support that. crbug.com/124399 51 // we'll probably want to support that. crbug.com/124399
53 return ui::TouchFactory::GetInstance()->IsTouchDevicePresent(); 52 return ui::TouchFactory::GetInstance()->IsTouchDevicePresent();
54 #else 53 #else
55 return false; 54 return false;
56 #endif 55 #endif
57 } 56 }
58 57
(...skipping 18 matching lines...) Expand all
77 #else 76 #else
78 return LAYOUT_DESKTOP; 77 return LAYOUT_DESKTOP;
79 #endif 78 #endif
80 } 79 }
81 80
82 float GetScaleFactorScale(ScaleFactor scale_factor) { 81 float GetScaleFactorScale(ScaleFactor scale_factor) {
83 return kScaleFactorScales[scale_factor]; 82 return kScaleFactorScales[scale_factor];
84 } 83 }
85 84
86 } // namespace ui 85 } // namespace ui
OLDNEW
« chrome/installer/mini_installer.gyp ('K') | « chrome/tools/build/win/create_installer_archive.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698