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

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

Issue 2935893004: Add unittest for ArcNotificationContentView (Closed)
Patch Set: Rebased 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.h
diff --git a/ui/arc/notification/arc_notification_surface.h b/ui/arc/notification/arc_notification_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..00af70d891ca152e478fc9f19d5d3c5fb41d9033
--- /dev/null
+++ b/ui/arc/notification/arc_notification_surface.h
@@ -0,0 +1,54 @@
+// 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_H_
+#define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "ui/gfx/geometry/size.h"
+
+namespace aura {
+class Window;
+}
+
+namespace views {
+class NativeViewHost;
+}
+
+namespace arc {
+
+// Handles notification surface role.
+class ArcNotificationSurface {
+ public:
+ ArcNotificationSurface() = default;
+ virtual ~ArcNotificationSurface() = default;
+
+ // Returns the content size of the notification surface.
+ virtual gfx::Size GetSize() const = 0;
+
+ // Returns the window of NotificationSurface.
+ virtual aura::Window* GetWindow() const = 0;
+
+ // Returns the window of the inner Surface.
+ virtual aura::Window* GetContentWindow() const = 0;
+
+ // Returns the notification key which is associated with Android notification.
+ virtual const std::string& GetNotificationKey() const = 0;
+
+ // Attach the surface window to the native host.
hidehiko 2017/06/15 15:26:20 nit: s/Attach/Attaches/
yoshiki 2017/06/16 11:29:08 Done.
+ virtual void Attach(views::NativeViewHost* native_view_host) = 0;
+
+ virtual void Detach() = 0;
hidehiko 2017/06/15 15:26:20 Doc?
yoshiki 2017/06/16 11:29:08 Done.
+
+ virtual bool IsAttached() const = 0;
hidehiko 2017/06/15 15:26:20 Doc?
yoshiki 2017/06/16 11:29:08 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurface);
+};
+
+} // namespace arc
+
+#endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698