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

Side by Side Diff: components/exo/notification_surface.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/display.cc ('k') | components/exo/notification_surface.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 2016 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 #ifndef COMPONENTS_EXO_NOTIFICATION_SURFACE_H_
6 #define COMPONENTS_EXO_NOTIFICATION_SURFACE_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/macros.h"
12 #include "components/exo/surface_delegate.h"
13 #include "components/exo/surface_observer.h"
14 #include "ui/gfx/geometry/size.h"
15
16 namespace aura {
17 class Window;
18 }
19
20 namespace exo {
21 class NotificationSurfaceManager;
22 class Surface;
23
24 // Handles notification surface role of a given surface.
25 class NotificationSurface : public SurfaceDelegate, public SurfaceObserver {
26 public:
27 NotificationSurface(NotificationSurfaceManager* manager,
28 Surface* surface,
29 const std::string& notification_id);
30 ~NotificationSurface() override;
31
32 gfx::Size GetSize() const;
33
34 aura::Window* window() { return window_.get(); }
35 const std::string& notification_id() const { return notification_id_; }
36
37 private:
38 // Overridden from SurfaceDelegate:
39 void OnSurfaceCommit() override;
40 bool IsSurfaceSynchronized() const override;
41
42 // Overridden from SurfaceObserver:
43 void OnSurfaceDestroying(Surface* surface) override;
44
45 NotificationSurfaceManager* const manager_; // Not owned.
46 Surface* surface_; // Not owned.
47 const std::string notification_id_;
48
49 std::unique_ptr<aura::Window> window_;
50
51 DISALLOW_COPY_AND_ASSIGN(NotificationSurface);
52 };
53
54 } // namespace exo
55
56 #endif // COMPONENTS_EXO_NOTIFICATION_SURFACE_H_
OLDNEW
« no previous file with comments | « components/exo/display.cc ('k') | components/exo/notification_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698