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. | |
45 virtual void Detach() = 0; | |
hidehiko
2017/06/18 17:44:05
Please document that this must not be called if Is
yoshiki
2017/06/19 09:09:02
Done.
| |
46 | |
47 // True if the surface window is attached to the native host. False otherwise. | |
48 virtual bool IsAttached() const = 0; | |
49 | |
50 private: | |
51 DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurface); | |
52 }; | |
53 | |
54 } // namespace arc | |
55 | |
56 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_SURFACE_H_ | |
OLD | NEW |