OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_ARC_TEST_FAKE_NOTIFICATIONS_INSTANCE_H_ | 5 #ifndef COMPONENTS_ARC_TEST_FAKE_NOTIFICATIONS_INSTANCE_H_ |
6 #define COMPONENTS_ARC_TEST_FAKE_NOTIFICATIONS_INSTANCE_H_ | 6 #define COMPONENTS_ARC_TEST_FAKE_NOTIFICATIONS_INSTANCE_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "components/arc/common/notifications.mojom.h" | 11 #include "components/arc/common/notifications.mojom.h" |
12 #include "components/arc/test/fake_arc_bridge_instance.h" | |
13 | 12 |
14 namespace arc { | 13 namespace arc { |
15 | 14 |
16 class FakeNotificationsInstance : public mojom::NotificationsInstance { | 15 class FakeNotificationsInstance : public mojom::NotificationsInstance { |
17 public: | 16 public: |
18 FakeNotificationsInstance(); | 17 FakeNotificationsInstance(); |
19 ~FakeNotificationsInstance() override; | 18 ~FakeNotificationsInstance() override; |
20 | 19 |
21 void Init(mojom::NotificationsHostPtr host_ptr) override; | 20 void Init(mojom::NotificationsHostPtr host_ptr) override; |
22 | 21 |
23 void SendNotificationEventToAndroid( | 22 void SendNotificationEventToAndroid( |
24 const mojo::String& key, | 23 const mojo::String& key, |
25 mojom::ArcNotificationEvent event) override; | 24 mojom::ArcNotificationEvent event) override; |
26 void CreateNotificationWindow(const mojo::String& key) override; | 25 void CreateNotificationWindow(const mojo::String& key) override; |
27 void CloseNotificationWindow(const mojo::String& key) override; | 26 void CloseNotificationWindow(const mojo::String& key) override; |
28 | 27 |
29 const std::vector<std::pair<mojo::String, mojom::ArcNotificationEvent>>& | 28 const std::vector<std::pair<mojo::String, mojom::ArcNotificationEvent>>& |
30 events() const; | 29 events() const; |
31 | 30 |
32 private: | 31 private: |
33 std::vector<std::pair<mojo::String, mojom::ArcNotificationEvent>> events_; | 32 std::vector<std::pair<mojo::String, mojom::ArcNotificationEvent>> events_; |
34 | 33 |
35 DISALLOW_COPY_AND_ASSIGN(FakeNotificationsInstance); | 34 DISALLOW_COPY_AND_ASSIGN(FakeNotificationsInstance); |
36 }; | 35 }; |
37 | 36 |
38 } // namespace arc | 37 } // namespace arc |
39 | 38 |
40 #endif // COMPONENTS_ARC_TEST_FAKE_NOTIFICATIONS_INSTANCE_H_ | 39 #endif // COMPONENTS_ARC_TEST_FAKE_NOTIFICATIONS_INSTANCE_H_ |
OLD | NEW |