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

Unified Diff: ui/ozone/public/ozone_platform.cc

Issue 2795503002: mash: Don't synthesize extra key press events in the window server (Closed)
Patch Set: utility Created 3 years, 9 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
Index: ui/ozone/public/ozone_platform.cc
diff --git a/ui/ozone/public/ozone_platform.cc b/ui/ozone/public/ozone_platform.cc
index ff426d5c26c7109e145e2bf2b63dac2cca32d1a0..dee00b149f12a610af57b5868d5d409e42395cf3 100644
--- a/ui/ozone/public/ozone_platform.cc
+++ b/ui/ozone/public/ozone_platform.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/command_line.h"
+#include "ui/ozone/public/ozone_platform.h"
+
#include "base/logging.h"
#include "base/trace_event/trace_event.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/ozone/platform_object.h"
#include "ui/ozone/platform_selection.h"
-#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ozone_switches.h"
namespace ui {
@@ -18,7 +18,7 @@ namespace {
bool g_platform_initialized_ui = false;
bool g_platform_initialized_gpu = false;
-}
+} // namespace
OzonePlatform::OzonePlatform() {
DCHECK(!instance_) << "There should only be a single OzonePlatform.";
@@ -96,4 +96,10 @@ base::MessageLoop::Type OzonePlatform::GetMessageLoopTypeForGpu() {
void OzonePlatform::AddInterfaces(
service_manager::InterfaceRegistry* registry) {}
+ScopedOzonePlatformForTesting::ScopedOzonePlatformForTesting(
+ OzonePlatform* test_instance)
+ : auto_reset_(&OzonePlatform::instance_, test_instance) {}
+
+ScopedOzonePlatformForTesting::~ScopedOzonePlatformForTesting() = default;
+
} // namespace ui
« services/ui/ws/platform_display_default.h ('K') | « ui/ozone/public/ozone_platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698