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

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: remove InputMethodBridge workaround Created 3 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 | « ui/ozone/public/ozone_platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..875eabc483f68572ecc02c4f28b071bc5c2a9a52 100644
--- a/ui/ozone/public/ozone_platform.cc
+++ b/ui/ozone/public/ozone_platform.cc
@@ -2,14 +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 +17,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.";
@@ -60,6 +59,12 @@ void OzonePlatform::InitializeForGPU(const InitParams& args) {
}
// static
+void OzonePlatform::Shutdown() {
+ delete instance_;
+ // Destructor resets pointer.
+}
+
+// static
OzonePlatform* OzonePlatform::GetInstance() {
DCHECK(instance_) << "OzonePlatform is not initialized";
return instance_;
@@ -83,7 +88,7 @@ OzonePlatform* OzonePlatform::EnsureInstance() {
}
// static
-OzonePlatform* OzonePlatform::instance_;
+OzonePlatform* OzonePlatform::instance_ = nullptr;
IPC::MessageFilter* OzonePlatform::GetGpuMessageFilter() {
return nullptr;
« no previous file with comments | « ui/ozone/public/ozone_platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698