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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 8371022: touchui: Update a couple of command-line flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_init.cc
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 7ba03b7aa5b74e058821e6aa8bdf4823538711f5..0895db7408c1f540e0ebc18e837510444388ad7f 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -108,7 +108,7 @@
#endif
#endif
-#if defined(TOUCH_UI)
+#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
#include "ui/base/touch/touch_factory.h"
#endif
@@ -1487,10 +1487,10 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
}
#endif
-#if defined(TOUCH_UI)
+#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
// Get a list of pointer-devices that should be treated as touch-devices.
- // TODO(sad): Instead of/in addition to getting the list from the
- // command-line, query X for a list of touch devices.
+ // This is primarily used for testing/debugging touch-event processing when a
+ // touch-device isn't available.
std::string touch_devices =
command_line.GetSwitchValueASCII(switches::kTouchDevices);
@@ -1501,11 +1501,10 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
base::SplitString(touch_devices, ',', &devs);
for (std::vector<std::string>::iterator iter = devs.begin();
iter != devs.end(); ++iter) {
- if (base::StringToInt(*iter, reinterpret_cast<int*>(&devid))) {
+ if (base::StringToInt(*iter, reinterpret_cast<int*>(&devid)))
device_ids.push_back(devid);
- } else {
+ else
DLOG(WARNING) << "Invalid touch-device id: " << *iter;
- }
}
ui::TouchFactory::GetInstance()->SetTouchDeviceList(device_ids);
}
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698