| Index: ui/events/base_event_utils.cc
|
| diff --git a/ui/events/base_event_utils.cc b/ui/events/base_event_utils.cc
|
| index 622d2f206179bf0886a1ffc7110366ab16e4abbc..3ae5923bcb88932a2456ffa9437f5889648a475e 100644
|
| --- a/ui/events/base_event_utils.cc
|
| +++ b/ui/events/base_event_utils.cc
|
| @@ -14,37 +14,15 @@ namespace ui {
|
|
|
| namespace {
|
|
|
| -#if defined(OS_CHROMEOS)
|
| +#if defined(OS_CHROMEOS) && defined(USE_X11)
|
| // Determines whether touch events are enabled or disabled on ChromeOS only.
|
| bool touch_events_enabled = true;
|
| +#endif // defined(OS_CHROMEOS) && defined(USE_X11)
|
|
|
| +#if defined(OS_CHROMEOS)
|
| const int kSystemKeyModifierMask = EF_ALT_DOWN | EF_COMMAND_DOWN;
|
| #else
|
| const int kSystemKeyModifierMask = EF_ALT_DOWN;
|
| -
|
| -// Retrieves the status of the touch screen events from the command line on Non-
|
| -// ChromeOS platforms.
|
| -bool ComputeTouchStatus() {
|
| - const base::CommandLine& command_line =
|
| - *base::CommandLine::ForCurrentProcess();
|
| - const std::string touch_enabled_switch =
|
| - command_line.HasSwitch(switches::kTouchEvents) ?
|
| - command_line.GetSwitchValueASCII(switches::kTouchEvents) :
|
| - switches::kTouchEventsAuto;
|
| -
|
| - if (touch_enabled_switch.empty() ||
|
| - touch_enabled_switch == switches::kTouchEventsEnabled ||
|
| - touch_enabled_switch == switches::kTouchEventsAuto) {
|
| - return true;
|
| - }
|
| -
|
| - if (touch_enabled_switch == switches::kTouchEventsDisabled)
|
| - return false;
|
| -
|
| - LOG(ERROR) << "Invalid --touch-events option: " << touch_enabled_switch;
|
| - return false;
|
| -}
|
| -
|
| #endif // defined(OS_CHROMEOS)
|
|
|
| } // namespace
|
| @@ -68,22 +46,17 @@ bool IsSystemKeyModifier(int flags) {
|
| (EF_ALTGR_DOWN & flags) == 0;
|
| }
|
|
|
| -#if defined(OS_CHROMEOS)
|
| +#if defined(OS_CHROMEOS) && defined(USE_X11)
|
|
|
| -void SetTouchEventsEnabled(bool enabled) {
|
| +void SetTouchEventsCrOsX11MasterSwitch(bool enabled) {
|
| touch_events_enabled = enabled;
|
| }
|
|
|
| -#endif // defined(OS_CHROMEOS)
|
| -
|
| -bool AreTouchEventsEnabled() {
|
| -#if defined(OS_CHROMEOS)
|
| +bool GetTouchEventsCrOsX11MasterSwitch() {
|
| return touch_events_enabled;
|
| -#else
|
| - static bool touch_events_enabled = ComputeTouchStatus();
|
| - return touch_events_enabled;
|
| -#endif // !defined(OS_CHROMEOS)
|
| }
|
|
|
| +#endif // defined(OS_CHROMEOS) && defined(USE_X11)
|
| +
|
| } // namespace ui
|
|
|
|
|