This source file includes following definitions.
- Get
- media_player_event_router
- GetFactoryInstance
#include "chrome/browser/chromeos/extensions/media_player_api.h"
#include "base/lazy_instance.h"
#include "base/values.h"
#include "chrome/browser/chromeos/extensions/media_player_event_router.h"
namespace extensions {
MediaPlayerAPI::MediaPlayerAPI(content::BrowserContext* context)
: browser_context_(context) {}
MediaPlayerAPI::~MediaPlayerAPI() {
}
MediaPlayerAPI* MediaPlayerAPI::Get(content::BrowserContext* context) {
return BrowserContextKeyedAPIFactory<MediaPlayerAPI>::Get(context);
}
MediaPlayerEventRouter* MediaPlayerAPI::media_player_event_router() {
if (!media_player_event_router_)
media_player_event_router_.reset(
new MediaPlayerEventRouter(browser_context_));
return media_player_event_router_.get();
}
static base::LazyInstance<BrowserContextKeyedAPIFactory<MediaPlayerAPI> >
g_factory = LAZY_INSTANCE_INITIALIZER;
BrowserContextKeyedAPIFactory<MediaPlayerAPI>*
MediaPlayerAPI::GetFactoryInstance() {
return g_factory.Pointer();
}
}