Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: ui/aura/env_input_state_controller.h

Issue 2025843003: Introduce aura::Env controller to abstract away changes to aura::Env Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix extant aura_unnitest failures: Re-introduce custom logic in two places. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/aura/env_input_state_controller.h
diff --git a/ui/aura/env_input_state_controller.h b/ui/aura/env_input_state_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..b85b239173cad1e7c736bf2db762304bdad2b024
--- /dev/null
+++ b/ui/aura/env_input_state_controller.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// 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/macros.h"
+#include "ui/aura/aura_export.h"
+
+namespace gfx {
+class Point;
+}
+
+namespace ui {
+class MouseEvent;
+class TouchEvent;
+}
+
+namespace aura {
+
+class Window;
+
+class AURA_EXPORT EnvInputStateController {
+ public:
+ EnvInputStateController() : touch_ids_down_(0) {}
+ ~EnvInputStateController() {}
+
+ void UpdateStateForMouseEvent(const Window* window, ui::MouseEvent* event)
+ const;
+ void UpdateStateForTouchEvent(ui::TouchEvent* event);
+ void SetLastMouseLocation(const Window* root_window,
+ const gfx::Point& location_in_root) const;
+
+ private:
+ // Touch ids that are currently down.
+ uint32_t touch_ids_down_;
+
+ DISALLOW_COPY_AND_ASSIGN(EnvInputStateController);
+};
+
+} // namespace aura
+
+#endif // UI_AURA_ENV_INPUT_STATE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698