
* Keep the touch location in env. * Do not use gesture recognizer because touch events may not be processed by gesture recognizer * Update the tab dragging code to use ash's code path. * ozone/wayland pass through touch event to aura so that it can update the touch location. aura will skip these touch events. Bug:1343696 Test: updated wayland_window_drag_controller_unittest.cc TabDragControllerTest will be updated separately as there is known issue. Change-Id: I3e0ef2fb62c480908e9b4fea39f39ec81e691757 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4857121 Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org> Commit-Queue: Mitsuru Oshima <oshima@chromium.org> Reviewed-by: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/main@{#1204362}
58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
// Copyright 2016 The Chromium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef UI_AURA_ENV_INPUT_STATE_CONTROLLER_H_
|
|
#define UI_AURA_ENV_INPUT_STATE_CONTROLLER_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "base/memory/raw_ptr.h"
|
|
#include "ui/aura/aura_export.h"
|
|
|
|
namespace gfx {
|
|
class Point;
|
|
}
|
|
|
|
namespace ui {
|
|
class MouseEvent;
|
|
class TouchEvent;
|
|
}
|
|
|
|
namespace aura {
|
|
namespace test {
|
|
class EnvTestHelper;
|
|
}
|
|
|
|
class Env;
|
|
class Window;
|
|
|
|
class AURA_EXPORT EnvInputStateController {
|
|
public:
|
|
explicit EnvInputStateController(Env* env);
|
|
|
|
EnvInputStateController(const EnvInputStateController&) = delete;
|
|
EnvInputStateController& operator=(const EnvInputStateController&) = delete;
|
|
|
|
~EnvInputStateController();
|
|
|
|
void UpdateStateForMouseEvent(const Window* window,
|
|
const ui::MouseEvent& event);
|
|
void UpdateStateForTouchEvent(const Window* window,
|
|
const ui::TouchEvent& event);
|
|
void SetLastMouseLocation(const Window* root_window,
|
|
const gfx::Point& location_in_root) const;
|
|
uint32_t touch_ids_down() const { return touch_ids_down_; }
|
|
|
|
private:
|
|
friend class test::EnvTestHelper;
|
|
|
|
raw_ptr<Env> env_;
|
|
// Touch ids that are currently down.
|
|
uint32_t touch_ids_down_ = 0;
|
|
};
|
|
|
|
} // namespace aura
|
|
|
|
#endif // UI_AURA_ENV_INPUT_STATE_CONTROLLER_H_
|