summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 21:30:50 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 21:30:50 +0000
commit532aa5c667cf8512584c7062bf54614221e64673 (patch)
treebe7cee7e525469fa9cf3de0f7216b106a52b41ee /ui
parent99f344d9b8b2231d96f865e2cfb227dafe68b71c (diff)
downloadchromium_src-532aa5c667cf8512584c7062bf54614221e64673.zip
chromium_src-532aa5c667cf8512584c7062bf54614221e64673.tar.gz
chromium_src-532aa5c667cf8512584c7062bf54614221e64673.tar.bz2
Move ui/view/touchui/touch_mode_support.* to ui/base and make it platform
independent so it can be used to implement other touch features in aura. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9910019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/touch/touch_mode_support.cc (renamed from ui/views/touchui/touch_mode_support.cc)14
-rw-r--r--ui/base/touch/touch_mode_support.h (renamed from ui/views/touchui/touch_mode_support.h)10
-rw-r--r--ui/ui.gyp2
-rw-r--r--ui/views/views.gyp2
4 files changed, 9 insertions, 19 deletions
diff --git a/ui/views/touchui/touch_mode_support.cc b/ui/base/touch/touch_mode_support.cc
index abe3354..bfd3d1d 100644
--- a/ui/views/touchui/touch_mode_support.cc
+++ b/ui/base/touch/touch_mode_support.cc
@@ -2,25 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/views/touchui/touch_mode_support.h"
+#include "ui/base/touch/touch_mode_support.h"
#include "ui/base/ui_base_switches.h"
#include "base/command_line.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
// static
bool TouchModeSupport::IsTouchOptimized() {
-#if !defined(OS_WIN)
- // TODO(port): there is code in src/ui/base/touch for linux but it is not
- // suitable for consumption here.
- return false;
-#else
// TODO: Enable based on GetSystemMetrics(SM_DIGITIZER) returning NID_READY
- // and NID_INTEGRATED_TOUCH once code is ready.
+ // and NID_INTEGRATED_TOUCH once code is ready (Only for WIN).
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kTouchOptimizedUI);
-#endif
}
diff --git a/ui/views/touchui/touch_mode_support.h b/ui/base/touch/touch_mode_support.h
index f7e9c53..0e7edeff 100644
--- a/ui/views/touchui/touch_mode_support.h
+++ b/ui/base/touch/touch_mode_support.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_VIEWS_TOUCHUI_TOUCH_MODE_SUPPORT_H_
-#define UI_VIEWS_TOUCHUI_TOUCH_MODE_SUPPORT_H_
+#ifndef UI_BASE_TOUCH_TOUCH_MODE_SUPPORT_H_
+#define UI_BASE_TOUCH_TOUCH_MODE_SUPPORT_H_
#pragma once
#include "base/basictypes.h"
-#include "ui/views/views_export.h"
+#include "ui/base/ui_export.h"
-class VIEWS_EXPORT TouchModeSupport {
+class UI_EXPORT TouchModeSupport {
public:
// Returns whether we should be operating in touch-friendly mode.
static bool IsTouchOptimized();
@@ -18,4 +18,4 @@ class VIEWS_EXPORT TouchModeSupport {
DISALLOW_IMPLICIT_CONSTRUCTORS(TouchModeSupport);
};
-#endif // UI_VIEWS_TOUCHUI_TOUCH_MODE_SUPPORT_H_
+#endif // UI_BASE_TOUCH_TOUCH_MODE_SUPPORT_H_
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 8923fd4..8bc9f88 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -211,6 +211,8 @@
'base/theme_provider.h',
'base/touch/touch_factory.cc',
'base/touch/touch_factory.h',
+ 'base/touch/touch_mode_support.cc',
+ 'base/touch/touch_mode_support.h',
'base/ui_base_exports.cc',
'base/ui_base_paths.cc',
'base/ui_base_paths.h',
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index 5823fbc..64db0ec 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -290,8 +290,6 @@
'painter.h',
'repeat_controller.cc',
'repeat_controller.h',
- 'touchui/touch_mode_support.cc',
- 'touchui/touch_mode_support.h',
'touchui/touch_selection_controller.cc',
'touchui/touch_selection_controller.h',
'view.cc',