| Index: components/arc/notification/arc_notification_manager.h
|
| diff --git a/components/arc/notification/arc_notification_manager.h b/components/arc/notification/arc_notification_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..59dcbdc3ee28d8aae213b83e4b5f90ec95e4ce7b
|
| --- /dev/null
|
| +++ b/components/arc/notification/arc_notification_manager.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2015 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 COMPONENTS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
|
| +#define COMPONENTS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
|
| +
|
| +#include <map>
|
| +#include <string>
|
| +
|
| +#include "base/containers/scoped_ptr_hash_map.h"
|
| +#include "components/arc/arc_bridge_service.h"
|
| +#include "components/signin/core/account_id/account_id.h"
|
| +
|
| +namespace arc {
|
| +
|
| +class ArcNotificationItem;
|
| +
|
| +class ArcNotificationManager
|
| + : public arc::ArcBridgeService::NotificationObserver {
|
| + public:
|
| + explicit ArcNotificationManager(arc::ArcBridgeService* bridge_service,
|
| + const AccountId& main_profile_id);
|
| + ~ArcNotificationManager() override;
|
| +
|
| + // arc::ArcBridgeService::Observer implementation:
|
| + void OnNotificationPostedFromAndroid(
|
| + const arc::ArcNotificationData& data) override;
|
| + void OnNotificationRemovedFromAndroid(const std::string& key) override;
|
| +
|
| + // Methods called from ArcNotificationItem:
|
| + void SendNotificationRemovedFromChrome(const std::string& key);
|
| + void SendNotificationClickedOnChrome(const std::string& key);
|
| +
|
| + private:
|
| + arc::ArcBridgeService* const arc_bridge_;
|
| + const AccountId main_profile_id_;
|
| +
|
| + typedef base::ScopedPtrHashMap<std::string, scoped_ptr<ArcNotificationItem>>
|
| + Items;
|
| + Items items_;
|
| +};
|
| +
|
| +} // namespace arc
|
| +
|
| +#endif // COMPONENTS_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
|
|
|