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

Unified Diff: components/exo/display.cc

Issue 1412093006: components: Add Exosphere component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove some ifdefs Created 5 years, 1 month 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 | « components/exo/display.h ('k') | components/exo/display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/display.cc
diff --git a/components/exo/display.cc b/components/exo/display.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bb6a017bdbe294bc8a97f380a1dfa9ffbb76b26a
--- /dev/null
+++ b/components/exo/display.cc
@@ -0,0 +1,46 @@
+// 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 "components/exo/display.h"
+
+#include "base/trace_event/trace_event.h"
+#include "base/trace_event/trace_event_argument.h"
+#include "components/exo/shared_memory.h"
+#include "components/exo/shell_surface.h"
+#include "components/exo/surface.h"
+
+namespace exo {
+
+////////////////////////////////////////////////////////////////////////////////
+// Display, public:
+
+Display::Display() {}
+
+Display::~Display() {}
+
+scoped_ptr<Surface> Display::CreateSurface() {
+ TRACE_EVENT0("exo", "Display::CreateSurface");
+
+ return make_scoped_ptr(new Surface);
+}
+
+scoped_ptr<SharedMemory> Display::CreateSharedMemory(
+ const base::SharedMemoryHandle& handle,
+ size_t size) {
+ TRACE_EVENT1("exo", "Display::CreateSharedMemory", "size", size);
+
+ if (!base::SharedMemory::IsHandleValid(handle))
+ return nullptr;
+
+ return make_scoped_ptr(new SharedMemory(handle));
+}
+
+scoped_ptr<ShellSurface> Display::CreateShellSurface(Surface* surface) {
+ TRACE_EVENT1("exo", "Display::CreateShellSurface", "surface",
+ surface->AsTracedValue());
+
+ return make_scoped_ptr(new ShellSurface(surface));
+}
+
+} // namespace exo
« no previous file with comments | « components/exo/display.h ('k') | components/exo/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698