std::unique_ptr<Observer> observer)
: root_object_(root_object),
web_contents_(web_contents),
- observer_(std::move(observer)) {}
+ observer_(std::move(observer)) {
+ LOG(INFO) << __func__;
+}
-EWebAccessibility::~EWebAccessibility() {}
+EWebAccessibility::~EWebAccessibility() {
+ LOG(INFO) << __func__;
+}
/* LCOV_EXCL_START */
AtkObject* EWebAccessibility::GetRootObject() {
void EWebAccessibility::AddPlug() {
if (!(IsMobileProfile() || IsTvProfile()))
return;
+ LOG(INFO) << __func__ << " start";
if (!accessibility_object_)
accessibility_object_.reset(new EWebAccessibilityObject(web_contents_));
auto plug_id =
atk_plug_get_id(ATK_PLUG(accessibility_object_->GetEflAtkObject()));
+
+ if (root_object_)
+ LOG(INFO) << "root_object_: " << root_object_;
+ else {
+ LOG(ERROR) << "root_object_ is nullptr.";
+ return;
+ }
+
if (plug_id) {
auto data = evas_object_data_get(root_object_, kPlugIdKey);
+ LOG(INFO) << "evas_object_data_get data: " << data
+ << " plug_id: " << plug_id;
if (data && !strcmp((char*)plug_id, (char*)data))
return;
atk_bridge_adaptor_cleanup();
LOG(ERROR) << "atk_plug_get_id failed.";
}
+ LOG(INFO) << __func__ << " end";
}
/* LCOV_EXCL_STOP */
void EWebAccessibility::RemovePlug() {
if (!(IsMobileProfile() || IsTvProfile()))
return;
+ LOG(INFO) << __func__ << " start";
+
+ if (root_object_)
+ LOG(INFO) << "root_object_: " << root_object_;
+ else {
+ LOG(WARNING) << "root_object_ is nullptr.";
+ return;
+ }
auto plug_id =
static_cast<char*>(evas_object_data_get(root_object_, kPlugIdKey));
if (plug_id) {
/* LCOV_EXCL_START */
evas_object_data_set(root_object_, kPlugIdKey, nullptr);
+ LOG(INFO) << " free plug_id " << plug_id;
free(plug_id);
}
/* LCOV_EXCL_STOP */
accessibility_object_.reset();
+ LOG(INFO) << __func__ << " end";
}
void EWebAccessibility::NotifyAccessibilityStatus(bool is_enabled) {
+ LOG(INFO) << __func__ << " start is_enabled : " << is_enabled;
if (IsMobileProfile() || IsTvProfile())
(is_enabled) ? AddPlug() : RemovePlug();
observer_->OnAccessibilityStatusChanged(is_enabled);
}
#endif
+ LOG(INFO) << __func__ << " end";
}
: web_contents_(web_contents),
efl_main_layout_(static_cast<content::WebContentsImplEfl*>(web_contents_)
->GetEflMainLayout()) {
+ LOG(INFO) << __func__;
evas_object_event_callback_add(efl_main_layout_, EVAS_CALLBACK_SHOW,
NativeViewShowCallback, this);
evas_object_event_callback_add(efl_main_layout_, EVAS_CALLBACK_HIDE,
}
EWebAccessibilityObject::~EWebAccessibilityObject() {
+ LOG(INFO) << __func__;
evas_object_event_callback_del(efl_main_layout_, EVAS_CALLBACK_SHOW,
NativeViewShowCallback);
evas_object_event_callback_del(efl_main_layout_, EVAS_CALLBACK_HIDE,
Evas*,
Evas_Object*,
void*) {
+ LOG(INFO) << __func__;
auto thiz = static_cast<EWebAccessibilityObject*>(data);
atk_object_notify_state_change(ATK_OBJECT(thiz->GetEflAtkObject()),
ATK_STATE_SHOWING, TRUE);
Evas*,
Evas_Object*,
void*) {
+ LOG(INFO) << __func__;
auto thiz = static_cast<EWebAccessibilityObject*>(data);
atk_object_notify_state_change(ATK_OBJECT(thiz->GetEflAtkObject()),
ATK_STATE_SHOWING, FALSE);
content::BrowserAccessibilityManager*
EWebAccessibilityObject::GetBrowserAccessibilityManager() const {
+ if (!web_contents_) {
+ LOG(ERROR) << "web_contents_ is null";
+ return nullptr;
+ }
+
auto frame = static_cast<content::RenderFrameHostImpl*>(
web_contents_->GetPrimaryMainFrame());
if (!frame) {