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

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

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ChildNativePixmapManager or BrowserNativePixmapManager Created 5 years, 5 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/native_pixmap_manager.cc
diff --git a/ui/ozone/public/native_pixmap_manager.cc b/ui/ozone/public/native_pixmap_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f030e548b04c76decc3a27dce425302394048faa
--- /dev/null
+++ b/ui/ozone/public/native_pixmap_manager.cc
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/ozone/public/native_pixmap_manager.h"
+
+#include "base/trace_event/trace_event.h"
+#include "ui/ozone/platform_object.h"
+#include "ui/ozone/platform_selection.h"
+
+namespace ui {
+
+namespace {
+
+NativePixmapManager* g_instance = nullptr;
+
+} // namespace
+
+// static
+NativePixmapManager* NativePixmapManager::GetInstance() {
+ return g_instance;
+}
+
+// static
+void NativePixmapManager::SetInstance(
+ scoped_ptr<NativePixmapManager> instance) {
+ DCHECK(!g_instance);
+ DCHECK(instance);
+ g_instance = instance.release();
+}
+
+// static
+scoped_ptr<NativePixmapManager> NativePixmapManager::Create() {
+ TRACE_EVENT1("ozone", "NativePixmapManager::Create", "platform",
+ GetOzonePlatformName());
+ scoped_ptr<NativePixmapManager> manager =
reveman 2015/07/23 14:46:12 just "return PlatformObject<NativePixmapManager>::
dshwang 2015/07/23 16:42:09 Done.
+ PlatformObject<NativePixmapManager>::Create();
+ return manager.Pass();
+}
+
+NativePixmapManager::NativePixmapManager() {}
+
+NativePixmapManager::~NativePixmapManager() {}
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698