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

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: add NotificationServiceRegistry to track notification surface Created 4 years, 6 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
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 <string>
9
10 #include "base/macros.h"
11 #include "components/exo/surface_observer.h"
12 #include "ui/gfx/geometry/size.h"
13
14 namespace exo {
15 class Surface;
16
17 // Handles notification surface role of a given surface.
18 class NotificationSurface : public SurfaceObserver {
reveman 2016/06/16 03:35:20 I think this should be a SurfaceDelegate so we can
xiyuan 2016/06/20 22:40:28 Done. Made it a SurfaceDelegate and create its own
19 public:
20 NotificationSurface(Surface* surface, const std::string& notification_id);
21 ~NotificationSurface() override;
22
23 gfx::Size GetSize() const;
24
25 Surface* surface() { return surface_; }
reveman 2016/06/16 03:35:20 Do we need to expose the Surface? What part of it
xiyuan 2016/06/20 22:40:29 Right now, the surface is handled via NativeViewHo
26 const std::string& notification_id() const { return notification_id_; }
27
28 private:
29 // SurfaceObserver
reveman 2016/06/16 03:35:20 nit: "Overridden from SurfaceObserver:"
xiyuan 2016/06/20 22:40:28 Done.
30 void OnSurfaceDestroying(Surface* surface) override;
31
32 Surface* surface_; // Not owned.
33 const std::string notification_id_;
34
35 DISALLOW_COPY_AND_ASSIGN(NotificationSurface);
36 };
37
38 } // namespace exo
39
40 #endif // COMPONENTS_EXO_NOTIFICATION_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698