HybridNavigationController::HybridNavigationController(Browser* browser)
: browser_(browser),
is_initialized_(false),
- is_first_key_event_(true),
is_window_focused_(true),
is_long_pressed_(false),
is_return_press_passed_(false),
LOG(INFO) << "KeyEvent from InputManager, Key: " << key;
auto cursor_controller =
samsung_browser_main::SamsungBrowserCore::instance()->CursorController();
- if (is_first_key_event_) {
- LOG(INFO) << "First key event, Putting focus on webview area";
- browser_view_->GetContentsView()->RequestFocus();
- LOG(INFO) << "Moving cursor to native bar";
- cursor_controller->MovePointerTo(923, 53, true);
- is_first_key_event_ = false;
- }
if (IsKeyboardDevice(deviceId, deviceName, subClass)) {
LOG(INFO) << "Keyboard event, passing it";
return false;
int x,
int y) {
LOG(INFO) << "Webview area event";
- OmniboxPopupView* popup =
- browser_view_->GetLocationBarView()->GetOmniboxPopupView();
+ samsung_browser_main::NativePopupType nativePopupType = GetNativePopupType();
auto cursor_controller =
samsung_browser_main::SamsungBrowserCore::instance()->CursorController();
if (!keynameArrowUp.compare(key)) {
LOG(INFO) << "On KeyEvent, KEY: down";
if (y ==
toolbarMidY) { // focus coming to webview, currently on toolbarview
- LOG(INFO) << "Moving cursor to webview area";
- cursor_controller->MovePointerTo(x, webViewStartY, true);
- if (isInternalPage() && (popup && !popup->IsOpen())) {
+ LOG(INFO) << "Moving cursor from toolbar to webview area";
+ if (isInternalPage() &&
+ nativePopupType == samsung_browser_main::NativePopupType::NONE) {
LOG(INFO) << "Internal page, Putting focus on webview area";
browser_view_->GetContentsView()->RequestFocus();
/*
"cr.webUIListenerCallback", base::Value("NativeToJS"),
base::Value(x), base::Value(y), base::Value("Down"));
LOG(INFO) << "check";
+ return;
}
}
LOG(INFO) << "Calling cursor controller movePointer";