#include "chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h"
#include <utility>
#include "base/lazy_instance.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/api/braille_display_private/braille_controller.h"
#include "chrome/browser/profiles/profile.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/accessibility/accessibility_manager.h"
#include "chrome/browser/ash/login/lock/screen_locker.h"
#include "chrome/browser/profiles/profile_manager.h"
#endif
OnDisplayStateChanged;
OnKeyEvent;
WriteDots;
DisplayState;
KeyEvent;
BrailleController;
namespace extensions {
class BrailleDisplayPrivateAPI::DefaultEventDelegate
: public BrailleDisplayPrivateAPI::EventDelegate { … };
BrailleDisplayPrivateAPI::BrailleDisplayPrivateAPI(
content::BrowserContext* context)
: … { … }
BrailleDisplayPrivateAPI::~BrailleDisplayPrivateAPI() { … }
void BrailleDisplayPrivateAPI::Shutdown() { … }
static base::LazyInstance<
BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI>>::DestructorAtExit
g_braille_display_private_api_factory = …;
BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI>*
BrailleDisplayPrivateAPI::GetFactoryInstance() { … }
void BrailleDisplayPrivateAPI::OnBrailleDisplayStateChanged(
const DisplayState& display_state) { … }
void BrailleDisplayPrivateAPI::OnBrailleKeyEvent(const KeyEvent& key_event) { … }
bool BrailleDisplayPrivateAPI::IsProfileActive() { … }
void BrailleDisplayPrivateAPI::SetEventDelegateForTest(
std::unique_ptr<EventDelegate> delegate) { … }
void BrailleDisplayPrivateAPI::OnListenerAdded(
const EventListenerInfo& details) { … }
void BrailleDisplayPrivateAPI::OnListenerRemoved(
const EventListenerInfo& details) { … }
BrailleDisplayPrivateAPI::DefaultEventDelegate::DefaultEventDelegate(
EventRouter::Observer* observer, Profile* profile)
: … { … }
BrailleDisplayPrivateAPI::DefaultEventDelegate::~DefaultEventDelegate() { … }
void BrailleDisplayPrivateAPI::DefaultEventDelegate::BroadcastEvent(
std::unique_ptr<Event> event) { … }
bool BrailleDisplayPrivateAPI::DefaultEventDelegate::HasListener() { … }
namespace api {
ExtensionFunction::ResponseAction
BrailleDisplayPrivateGetDisplayStateFunction::Run() { … }
void BrailleDisplayPrivateGetDisplayStateFunction::ReplyWithState(
base::Value::Dict state) { … }
BrailleDisplayPrivateWriteDotsFunction::
BrailleDisplayPrivateWriteDotsFunction() = default;
BrailleDisplayPrivateWriteDotsFunction::
~BrailleDisplayPrivateWriteDotsFunction() = default;
ExtensionFunction::ResponseAction
BrailleDisplayPrivateWriteDotsFunction::Run() { … }
void BrailleDisplayPrivateWriteDotsFunction::WriteDotsOnIO() { … }
ExtensionFunction::ResponseAction
BrailleDisplayPrivateUpdateBluetoothBrailleDisplayAddressFunction::Run() { … }
}
}