#ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_H_
#define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_H_
#include <string>
#include <vector>
#include "base/memory/scoped_vector.h"
#include "chrome/browser/notifications/sync_notifier/image_holder.h"
#include "ui/gfx/image/image.h"
#include "ui/message_center/notifier_settings.h"
#include "url/gurl.h"
class Profile;
namespace notifier {
class SyncedNotificationAppInfoService;
class SyncedNotificationAppInfo : public notifier::ImageHolderDelegate {
public:
SyncedNotificationAppInfo(
Profile* const profile,
const std::string& settings_display_name,
SyncedNotificationAppInfoService* synced_notification_app_info_service);
virtual ~SyncedNotificationAppInfo();
bool HasAppId(const std::string& app_id);
void AddAppId(const std::string& app_id);
void RemoveAppId(const std::string& app_id);
std::string settings_display_name() const { return settings_display_name_; }
void SetSettingsURLs(const GURL& settings_low_dpi,
const GURL& settings_high_dpi);
void SetMonochromeURLs(const GURL& monochrome_low_dpi,
const GURL& monochrome_high_dpi);
void SetWelcomeURLs(const GURL& welcome_low_dpi,
const GURL& welcome_high_dpi);
GURL settings_icon_url();
void set_added_app_ids(std::vector<std::string> added_app_ids) {
added_app_ids_ = added_app_ids;
}
std::vector<std::string> added_app_ids() { return added_app_ids_; }
void set_removed_app_ids(std::vector<std::string> removed_app_ids) {
removed_app_ids_ = removed_app_ids;
}
std::vector<std::string> removed_app_ids() { return removed_app_ids_; }
gfx::Image icon();
std::vector<std::string> GetAppIdList();
void QueueBitmapFetchJobs();
void StartBitmapFetch();
virtual void OnFetchComplete() OVERRIDE;
bool AreAllBitmapsFetched();
message_center::NotifierId GetNotifierId();
private:
Profile* profile_;
std::vector<std::string> app_ids_;
std::string settings_display_name_;
scoped_ptr<ImageHolder> settings_holder_;
scoped_ptr<ImageHolder> monochrome_holder_;
scoped_ptr<ImageHolder> welcome_holder_;
GURL welcome_landing_page_url_;
std::vector<std::string> added_app_ids_;
std::vector<std::string> removed_app_ids_;
SyncedNotificationAppInfoService* synced_notification_app_info_service_;
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, AddRemoveTest);
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, GetAppIdListTest);
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest,
CreateBitmapFetcherTest);
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, OnFetchCompleteTest);
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest,
QueueBitmapFetchJobsTest);
FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest,
AreAllBitmapsFetchedTest);
DISALLOW_COPY_AND_ASSIGN(SyncedNotificationAppInfo);
};
}
#endif