| 502 | } |
| 503 | |
| 504 | int InputManager::PointerDown(BrowserHandle browser_wrapper, |
| 505 | const Json::Value& down_action, |
| 506 | InputState* input_state) { |
| 507 | LOG(TRACE) << "Entering InputManager::PointerDown"; |
| 508 | int button = down_action["button"].asInt(); |
| 509 | HWND browser_window_handle = browser_wrapper->GetContentWindowHandle(); |
| 510 | LOG(DEBUG) << "Queueing SendInput structure for mouse button down"; |
| 511 | long button_event_value = MOUSEEVENTF_LEFTDOWN; |
| 512 | if (button == WD_CLIENT_RIGHT_MOUSE_BUTTON) { |
| 513 | button_event_value = MOUSEEVENTF_RIGHTDOWN; |
| 514 | } |
| 515 | this->AddMouseInput(browser_window_handle, |
| 516 | button_event_value, |
| 517 | input_state->mouse_x, |
| 518 | input_state->mouse_y); |
| 519 | if (button == WD_CLIENT_RIGHT_MOUSE_BUTTON) { |
| 520 | input_state->is_right_button_pressed = true; |
| 521 | } else { |
| 522 | input_state->is_left_button_pressed = true; |
| 523 | } |
| 524 | return WD_SUCCESS; |
| 525 | } |
| 526 | |
| 527 | int InputManager::PointerUp(BrowserHandle browser_wrapper, |
| 528 | const Json::Value& up_action, |
no test coverage detected