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

Unified Diff: components/mus/ws/accelerator.h

Issue 1909733002: mus: Add EventObserver to allow passively listening to UI events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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: components/mus/ws/accelerator.h
diff --git a/components/mus/ws/accelerator.h b/components/mus/ws/accelerator.h
index b1140584e816044a268a6b262cde07c2ab06da4e..4276e42c9c677d8791ec3553ac45c71ef9f140f3 100644
--- a/components/mus/ws/accelerator.h
+++ b/components/mus/ws/accelerator.h
@@ -5,12 +5,16 @@
#ifndef COMPONENTS_MUS_WS_ACCELERATOR_H_
#define COMPONENTS_MUS_WS_ACCELERATOR_H_
+#include <stdint.h>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/mus/public/interfaces/input_event_matcher.mojom.h"
-#include "ui/events/event.h"
-#include "ui/gfx/geometry/rect_f.h"
+#include "components/mus/ws/event_tester.h"
+
+namespace ui {
+class Event;
+}
namespace mus {
namespace ws {
@@ -39,27 +43,9 @@ class Accelerator {
uint32_t id() const { return id_; }
private:
- enum MatchFields {
- NONE = 0,
- TYPE = 1 << 0,
- FLAGS = 1 << 1,
- KEYBOARD_CODE = 1 << 2,
- POINTER_KIND = 1 << 3,
- POINTER_LOCATION = 1 << 4,
- };
-
uint32_t id_;
- uint32_t fields_to_match_;
mojom::AcceleratorPhase accelerator_phase_;
- ui::EventType event_type_;
- // Bitfields of kEventFlag* and kMouseEventFlag* values in
- // input_event_constants.mojom.
- int event_flags_;
- int ignore_event_flags_;
- uint16_t keyboard_code_;
- ui::EventPointerType pointer_type_;
- gfx::RectF pointer_region_;
-
+ EventTester event_tester_;
base::WeakPtrFactory<Accelerator> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(Accelerator);

Powered by Google App Engine
This is Rietveld 408576698