OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_H_ |
| 6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "ui/gfx/geometry/size.h" |
| 12 |
| 13 namespace aura { |
| 14 class Window; |
| 15 } |
| 16 |
| 17 namespace views { |
| 18 class NativeViewHost; |
| 19 } |
| 20 |
| 21 namespace arc { |
| 22 |
| 23 // Handles notification surface role. |
| 24 class ArcNotificationSurface { |
| 25 public: |
| 26 ArcNotificationSurface() = default; |
| 27 virtual ~ArcNotificationSurface() = default; |
| 28 |
| 29 // Returns the content size of the notification surface. |
| 30 virtual gfx::Size GetSize() const = 0; |
| 31 |
| 32 // Returns the window of NotificationSurface. |
| 33 virtual aura::Window* GetWindow() const = 0; |
| 34 |
| 35 // Returns the window of the inner Surface. |
| 36 virtual aura::Window* GetContentWindow() const = 0; |
| 37 |
| 38 // Returns the notification key which is associated with Android notification. |
| 39 virtual const std::string& GetNotificationKey() const = 0; |
| 40 |
| 41 // Attaches the surface window to the native host. |
| 42 virtual void Attach(views::NativeViewHost* native_view_host) = 0; |
| 43 |
| 44 // Detaches the surface window from the native host. Please ensure that a |
| 45 // surface window is attached before calling this method. |
| 46 virtual void Detach() = 0; |
| 47 |
| 48 // True if the surface window is attached to the native host. False otherwise. |
| 49 virtual bool IsAttached() const = 0; |
| 50 |
| 51 private: |
| 52 DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurface); |
| 53 }; |
| 54 |
| 55 } // namespace arc |
| 56 |
| 57 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_H_ |
OLD | NEW |