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

Unified Diff: ash/mus/accelerators/accelerator_controller_registrar.cc

Issue 2751323002: Converts ui::Accelerator::type to an enum (Closed)
Patch Set: remove dcheck Created 3 years, 9 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: ash/mus/accelerators/accelerator_controller_registrar.cc
diff --git a/ash/mus/accelerators/accelerator_controller_registrar.cc b/ash/mus/accelerators/accelerator_controller_registrar.cc
index bac53879de53d2035086295ba4327d2d986d6970..bf4acc72d7af35d0736f595941a99ef87a35b87c 100644
--- a/ash/mus/accelerators/accelerator_controller_registrar.cc
+++ b/ash/mus/accelerators/accelerator_controller_registrar.cc
@@ -142,10 +142,8 @@ void AcceleratorControllerRegistrar::AddAcceleratorToVector(
accelerator.modifiers());
pre_event_matcher->accelerator_phase =
ui::mojom::AcceleratorPhase::PRE_TARGET;
- DCHECK(accelerator.type() == ui::ET_KEY_PRESSED ||
- accelerator.type() == ui::ET_KEY_RELEASED);
pre_event_matcher->type_matcher->type =
- accelerator.type() == ui::ET_KEY_PRESSED
+ accelerator.key_state() == ui::Accelerator::KeyState::PRESSED
? ui::mojom::EventType::KEY_PRESSED
: ui::mojom::EventType::KEY_RELEASED;

Powered by Google App Engine
This is Rietveld 408576698