Adds ability for pre-target accelerators to not consume events

Prior to this change if you registered an accelerator for a key event
then only the accelerator got the event. After this change the tree
that registered the accelerator (wm) need not consume the event. If
the wm doesn't consume the event it'll be processed normally.

BUG=612331
TEST=covered by tests
[email protected], [email protected]

Review-Url: https://codereview.chromium.org/2125883003
Cr-Commit-Position: refs/heads/master@{#404450}
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index b14cae6..715d740f 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -230,18 +230,6 @@
   CreateRootWindowController(window, display);
 }
 
-void WindowManager::OnAccelerator(uint32_t id, const ui::Event& event) {
-  switch (id) {
-    case kWindowSwitchAccelerator:
-      window_manager_client()->ActivateNextWindow();
-      break;
-    default:
-      FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
-                        OnAccelerator(id, event));
-      break;
-  }
-}
-
 void WindowManager::OnWmPerformMoveLoop(
     ::ui::Window* window,
     ::ui::mojom::MoveLoopSource source,
@@ -254,5 +242,19 @@
   NOTIMPLEMENTED();
 }
 
+ui::mojom::EventResult WindowManager::OnAccelerator(uint32_t id,
+                                                    const ui::Event& event) {
+  switch (id) {
+    case kWindowSwitchAccelerator:
+      window_manager_client()->ActivateNextWindow();
+      break;
+    default:
+      FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
+                        OnAccelerator(id, event));
+      break;
+  }
+  return ui::mojom::EventResult::HANDLED;
+}
+
 }  // namespace mus
 }  // namespace ash