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

Side by Side Diff: components/exo/display.h

Issue 2065133002: exo: Implement notification surface support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification-wayland-protocol
Patch Set: fix compile Created 4 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 unified diff | Download patch
« no previous file with comments | « components/exo/BUILD.gn ('k') | components/exo/display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_EXO_DISPLAY_H_ 5 #ifndef COMPONENTS_EXO_DISPLAY_H_
6 #define COMPONENTS_EXO_DISPLAY_H_ 6 #define COMPONENTS_EXO_DISPLAY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/shared_memory_handle.h" 14 #include "base/memory/shared_memory_handle.h"
14 15
15 #if defined(USE_OZONE) 16 #if defined(USE_OZONE)
16 #include "base/files/scoped_file.h" 17 #include "base/files/scoped_file.h"
17 #include "ui/gfx/buffer_types.h" 18 #include "ui/gfx/buffer_types.h"
18 #include "ui/gfx/geometry/size.h" 19 #include "ui/gfx/geometry/size.h"
19 #endif 20 #endif
20 21
21 namespace gfx { 22 namespace gfx {
22 class Point; 23 class Point;
23 } 24 }
24 25
25 namespace exo { 26 namespace exo {
27 class NotificationSurface;
28 class NotificationSurfaceManager;
26 class SharedMemory; 29 class SharedMemory;
27 class ShellSurface; 30 class ShellSurface;
28 class SubSurface; 31 class SubSurface;
29 class Surface; 32 class Surface;
30 33
31 #if defined(USE_OZONE) 34 #if defined(USE_OZONE)
32 class Buffer; 35 class Buffer;
33 #endif 36 #endif
34 37
35 // The core display class. This class provides functions for creating surfaces 38 // The core display class. This class provides functions for creating surfaces
36 // and is in charge of combining the contents of multiple surfaces into one 39 // and is in charge of combining the contents of multiple surfaces into one
37 // displayable output. 40 // displayable output.
38 class Display { 41 class Display {
39 public: 42 public:
40 Display(); 43 Display();
44 explicit Display(NotificationSurfaceManager* notification_surface_manager);
41 ~Display(); 45 ~Display();
42 46
43 // Creates a new surface. 47 // Creates a new surface.
44 std::unique_ptr<Surface> CreateSurface(); 48 std::unique_ptr<Surface> CreateSurface();
45 49
46 // Creates a shared memory segment from |handle| of |size| with the 50 // Creates a shared memory segment from |handle| of |size| with the
47 // given |id|. This function takes ownership of |handle|. 51 // given |id|. This function takes ownership of |handle|.
48 std::unique_ptr<SharedMemory> CreateSharedMemory( 52 std::unique_ptr<SharedMemory> CreateSharedMemory(
49 const base::SharedMemoryHandle& handle, 53 const base::SharedMemoryHandle& handle,
50 size_t size); 54 size_t size);
(...skipping 20 matching lines...) Expand all
71 75
72 // Creates a remote shell surface for an existing surface using |container|. 76 // Creates a remote shell surface for an existing surface using |container|.
73 std::unique_ptr<ShellSurface> CreateRemoteShellSurface(Surface* surface, 77 std::unique_ptr<ShellSurface> CreateRemoteShellSurface(Surface* surface,
74 int container); 78 int container);
75 79
76 // Creates a sub-surface for an existing surface. The sub-surface will be 80 // Creates a sub-surface for an existing surface. The sub-surface will be
77 // a child of |parent|. 81 // a child of |parent|.
78 std::unique_ptr<SubSurface> CreateSubSurface(Surface* surface, 82 std::unique_ptr<SubSurface> CreateSubSurface(Surface* surface,
79 Surface* parent); 83 Surface* parent);
80 84
85 // Creates a notification surface for a surface and notification id.
86 std::unique_ptr<NotificationSurface> CreateNotificationSurface(
87 Surface* surface,
88 const std::string& notification_id);
89
81 private: 90 private:
91 NotificationSurfaceManager* const notification_surface_manager_;
92
82 DISALLOW_COPY_AND_ASSIGN(Display); 93 DISALLOW_COPY_AND_ASSIGN(Display);
83 }; 94 };
84 95
85 } // namespace exo 96 } // namespace exo
86 97
87 #endif // COMPONENTS_EXO_DISPLAY_H_ 98 #endif // COMPONENTS_EXO_DISPLAY_H_
OLDNEW
« no previous file with comments | « components/exo/BUILD.gn ('k') | components/exo/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698