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

Unified Diff: components/native_viewport/main.cc

Issue 1107133002: Fix native_viewport CommandLine; enable window_manager_apptests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/native_viewport/public/cpp/lib/args.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/native_viewport/main.cc
diff --git a/components/native_viewport/main.cc b/components/native_viewport/main.cc
index 2468612e212a15cc3d9556b966adbb3d3b7bac86..ac74808b3e3390ff134f09289fe996070a9f11cf 100644
--- a/components/native_viewport/main.cc
+++ b/components/native_viewport/main.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <algorithm>
-
#include "base/command_line.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
@@ -38,27 +36,13 @@ class NativeViewportAppDelegate : public mojo::ApplicationDelegate,
void Initialize(mojo::ApplicationImpl* application) override {
tracing_.Initialize(application);
-#if defined(OS_LINUX)
- // Apply the switch for kTouchEvents to CommandLine (if set). This allows
- // redirecting the mouse to a touch device on X for testing.
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- const std::string touch_event_string("--" +
- std::string(switches::kTouchDevices));
- auto touch_iter = std::find(application->args().begin(),
- application->args().end(),
- touch_event_string);
- if (touch_iter != application->args().end() &&
- ++touch_iter != application->args().end()) {
- command_line->AppendSwitchASCII(touch_event_string, *touch_iter);
- }
-#endif
-
- if (application->HasArg(mojo::kUseTestConfig))
+ if (command_line->HasSwitch(mojo::kUseTestConfig))
gfx::GLSurface::InitializeOneOffForTests();
else
gfx::GLSurface::InitializeOneOff();
- is_headless_ = application->HasArg(mojo::kUseHeadlessConfig);
+ is_headless_ = command_line->HasSwitch(mojo::kUseHeadlessConfig);
}
bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
« no previous file with comments | « no previous file | components/native_viewport/public/cpp/lib/args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698