aura::client::FocusClient* focus_client =
aura::client::GetFocusClient(window_host->window());
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (!blink::IsHbbTV() && focus_client) {
+#else
if (focus_client) {
+#endif
aura::Window* focused_window = focus_client->GetFocusedWindow();
if (focused_window)
#endif
KeyEvent event = MakeWebKeyEvent(true, key_down);
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Needed for HBBTV single window, multiwebview scenario.
+ event.SetDispatcher(thiz->window());
+#endif
auto im_context_efl = thiz->GetIMContextEfl();
if (!im_context_efl ||
im_context_efl->ShouldHandleImmediately(key_down->key)) {
}
KeyEvent event = MakeWebKeyEvent(false, key_up);
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Needed for HBBTV single window, multiwebview scenario.
+ event.SetDispatcher(thiz->window());
+#endif
auto im_context_efl = thiz->GetIMContextEfl();
if (!im_context_efl || im_context_efl->ShouldHandleImmediately(key_up->key)) {
EflPlatformEventSource::GetInstance()->DispatchEflEvent(&event);
#if BUILDFLAG(IS_TIZEN_TV)
void SetKeyEventChecker(
const base::RepeatingCallback<bool(void*, bool)>& checker);
+ EflWindow* window() { return window_; }
#endif
private:
PlatformWindowInitProperties properties,
EflWindowManager* manager)
: delegate_(delegate), window_manager_(manager) {
+ LOG(INFO) << this;
Initialize(properties);
}
if (!context)
return nullptr;
- return std::make_unique<IMContextEfl>(context);
+ return std::make_unique<IMContextEfl>(context, window);
}
-IMContextEfl::IMContextEfl(Ecore_IMF_Context* context) : context_(context) {
+IMContextEfl::IMContextEfl(Ecore_IMF_Context* context, EflWindow* window)
+ : context_(context), window_(window) {
IM_CTX_LOG;
InitializeIMFContext();
}
is_keyevent_processing_ = true;
PushToKeyUpEventQueue(event.key_code());
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Needed for HBBTV single window, multiwebview scenario.
+ event.SetDispatcher(window_);
+#endif
EflPlatformEventSource::GetInstance()->DispatchEflEvent(&event);
}
LOG(INFO) << "ProcessNextKeyDownEvent,key:"
<< keydown_event_queue_.front().key_code();
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Needed for HBBTV single window, multiwebview scenario.
+ keydown_event_queue_.front().SetDispatcher(window_);
+#endif
EflPlatformEventSource::GetInstance()->DispatchEflEvent(
&keydown_event_queue_.front());
keydown_event_queue_.pop();
LOG(INFO) << "ProcessNextKeyUpEvent,key:" << keyup_event_queue_.front();
KeyEvent event(ET_KEY_RELEASED, keyup_event_queue_.front(), EF_NONE,
base::TimeTicks());
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Needed for HBBTV single window, multiwebview scenario.
+ event.SetDispatcher(window_);
+#endif
EflPlatformEventSource::GetInstance()->DispatchEflEvent(&event);
keyup_event_queue_.pop();
}
// Returns nullptr if there is no available backend.
static std::unique_ptr<IMContextEfl> Create(EflWindow*);
- IMContextEfl(Ecore_IMF_Context*);
+ IMContextEfl(Ecore_IMF_Context*, EflWindow*);
~IMContextEfl();
void HandleKeyDownEvent(const Evas_Event_Key_Down* event, bool* was_filtered);
bool is_keyevent_processing_ = false;
bool is_transaction_finished_ = true;
InputMethodAuraLinux* im_aura_ = nullptr;
+ EflWindow* window_ = nullptr;
content::RenderWidgetHostHelper* rwh_helper_ = nullptr;
};
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/latency/latency_info.h"
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "ui/events/platform/platform_event_dispatcher.h"
+#endif
+
namespace gfx {
class Transform;
}
// Every concrete class transitively inheriting Event must implement this
// method, even if any ancestors have provided an implementation.
virtual std::unique_ptr<Event> Clone() const = 0;
+#if BUILDFLAG(IS_TIZEN_TV)
+ void SetDispatcher(PlatformEventDispatcher* dispatcher) {
+ dispatcher_ = dispatcher;
+ }
+ PlatformEventDispatcher* GetDispatcher() { return dispatcher_; }
+#endif
protected:
Event(EventType type, base::TimeTicks time_stamp, int flags);
// The device id the event came from, or ED_UNKNOWN_DEVICE if the information
// is not available.
int source_device_id_ = ED_UNKNOWN_DEVICE;
+#if BUILDFLAG(IS_TIZEN_TV)
+ PlatformEventDispatcher* dispatcher_ = nullptr;
+#endif
std::unique_ptr<Properties> properties_;
};
#include "ui/events/platform/platform_event_observer.h"
#include "ui/events/platform/scoped_event_dispatcher.h"
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "base/logging.h"
+#include "tizen_src/ewk/efl_integration/common/application_type.h"
+#include "ui/events/event.h"
+#endif
+
namespace ui {
namespace {
if (action & POST_DISPATCH_PERFORM_DEFAULT) {
for (PlatformEventDispatcher& dispatcher : dispatchers_) {
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (content::IsHbbTV() && platform_event->IsKeyEvent()) {
+ if ((&dispatcher) == platform_event->GetDispatcher()) {
+ LOG(INFO) << "Dispatching event through dispatcher : "
+ << (&dispatcher);
+ action = dispatcher.DispatchEvent(platform_event);
+ if (action & POST_DISPATCH_STOP_PROPAGATION) {
+ break;
+ }
+ } else {
+ continue;
+ }
+ }
+#endif
if (dispatcher.CanDispatchEvent(platform_event))
action = dispatcher.DispatchEvent(platform_event);
if (action & POST_DISPATCH_STOP_PROPAGATION)