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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « components/exo/display.h ('k') | components/exo/display_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/exo/display.h"
6
7 #include "base/trace_event/trace_event.h"
8 #include "base/trace_event/trace_event_argument.h"
9 #include "components/exo/shared_memory.h"
10 #include "components/exo/shell_surface.h"
11 #include "components/exo/surface.h"
12
13 namespace exo {
14
15 ////////////////////////////////////////////////////////////////////////////////
16 // Display, public:
17
18 Display::Display() {}
19
20 Display::~Display() {}
21
22 scoped_ptr<Surface> Display::CreateSurface() {
23 TRACE_EVENT0("exo", "Display::CreateSurface");
24
25 return make_scoped_ptr(new Surface);
26 }
27
28 scoped_ptr<SharedMemory> Display::CreateSharedMemory(
29 const base::SharedMemoryHandle& handle,
30 size_t size) {
31 TRACE_EVENT1("exo", "Display::CreateSharedMemory", "size", size);
32
33 if (!base::SharedMemory::IsHandleValid(handle))
34 return nullptr;
35
36 return make_scoped_ptr(new SharedMemory(handle));
37 }
38
39 scoped_ptr<ShellSurface> Display::CreateShellSurface(Surface* surface) {
40 TRACE_EVENT1("exo", "Display::CreateShellSurface", "surface",
41 surface->AsTracedValue());
42
43 return make_scoped_ptr(new ShellSurface(surface));
44 }
45
46 } // namespace exo
OLDNEW
« 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