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

Unified Diff: ui/arc/notification/arc_notification_surface_impl.h

Issue 2935893004: Add unittest for ArcNotificationContentView (Closed)
Patch Set: . Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/arc/notification/arc_notification_surface_impl.h
diff --git a/ui/arc/notification/arc_notification_surface_impl.h b/ui/arc/notification/arc_notification_surface_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..c4a50720c5801f29eb8b118adfaa532c55b9f068
--- /dev/null
+++ b/ui/arc/notification/arc_notification_surface_impl.h
@@ -0,0 +1,41 @@
+// Copyright 2017 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.
+
+#ifndef UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_IMPL_H_
+#define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_IMPL_H_
+
+#include "ui/arc/notification/arc_notification_surface.h"
+
+namespace exo {
+class NotificationSurface;
+}
+
+namespace arc {
+
+// Handles notification surface role of a given surface.
+class ArcNotificationSurfaceImpl : public ArcNotificationSurface {
+ public:
+ explicit ArcNotificationSurfaceImpl(exo::NotificationSurface* surface);
+
+ // ArcNotificationSurface overrides:
+ gfx::Size GetSize() const override;
+ aura::Window* GetWindow() const override;
+ aura::Window* GetContentWindow() const override;
+ const std::string& GetNotificationKey() const override;
+ void Attach(views::NativeViewHost* native_view_host) override;
+ void Detach() override;
+ bool IsAttached() const override;
+
+ exo::NotificationSurface* surface() const { return surface_; }
+
+ private:
+ exo::NotificationSurface* surface_;
+ views::NativeViewHost* native_view_host_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurfaceImpl);
+};
+
+} // namespace arc
+
+#endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_IMPL_H_
« no previous file with comments | « ui/arc/notification/arc_notification_surface.h ('k') | ui/arc/notification/arc_notification_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698