#include "chrome/browser/extensions/api/reading_list/reading_list_event_router.h"
#include "base/no_destructor.h"
#include "chrome/browser/extensions/api/reading_list/reading_list_util.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
#include "chrome/browser/reading_list/reading_list_model_factory.h"
#include "chrome/common/extensions/api/reading_list.h"
#include "components/reading_list/core/reading_list_entry.h"
#include "components/reading_list/core/reading_list_model.h"
#include "content/public/browser/browser_context.h"
#include "extensions/browser/event_router_factory.h"
namespace extensions {
namespace {
class ReadingListEventRouterFactory : public ProfileKeyedServiceFactory { … };
ReadingListEventRouterFactory::ReadingListEventRouterFactory()
: … { … }
ReadingListEventRouter* ReadingListEventRouterFactory::GetForProfile(
content::BrowserContext* context) { … }
KeyedService* ReadingListEventRouterFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const { … }
bool ReadingListEventRouterFactory::ServiceIsCreatedWithBrowserContext() const { … }
bool ReadingListEventRouterFactory::ServiceIsNULLWhileTesting() const { … }
}
ReadingListEventRouter::ReadingListEventRouter(
content::BrowserContext* browser_context)
: … { … }
ReadingListEventRouter::~ReadingListEventRouter() = default;
ReadingListEventRouter* ReadingListEventRouter::Get(
content::BrowserContext* browser_context) { … }
ProfileKeyedServiceFactory* ReadingListEventRouter::GetFactoryInstance() { … }
void ReadingListEventRouter::ReadingListDidAddEntry(
const ReadingListModel* model,
const GURL& url,
reading_list::EntrySource source) { … }
void ReadingListEventRouter::ReadingListWillRemoveEntry(
const ReadingListModel* model,
const GURL& url) { … }
void ReadingListEventRouter::ReadingListDidUpdateEntry(
const ReadingListModel* model,
const GURL& url) { … }
void ReadingListEventRouter::ReadingListDidMoveEntry(
const ReadingListModel* model,
const GURL& url) { … }
void ReadingListEventRouter::DispatchEvent(
events::HistogramValue histogram_value,
const std::string& event_name,
base::Value::List args) { … }
}