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

Unified Diff: chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h

Issue 1211003002: Revert of Proposed alternative for supporting ChromeVox keyboard commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h
diff --git a/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h b/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h
deleted file mode 100644
index 2d6fcf060604b5d2ae1eb5d5936bdd442387ea2d..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 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 CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_H_
-#define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_H_
-
-#include <vector>
-
-#include "ui/events/event_rewriter.h"
-
-namespace ui {
-class KeyEvent;
-}
-
-// Receives requests for spoken feedback enabled state and command dispatch.
-class SpokenFeedbackEventRewriterDelegate {
- public:
- SpokenFeedbackEventRewriterDelegate() {}
- virtual ~SpokenFeedbackEventRewriterDelegate() {}
-
- // Returns true when ChromeVox is enabled.
- virtual bool IsSpokenFeedbackEnabled() const;
-
- // Returns true when |key_event| is dispatched to ChromeVox.
- virtual bool DispatchKeyToChromeVox(const ui::KeyEvent key_event);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SpokenFeedbackEventRewriterDelegate);
-};
-
-// SpokenFeedbackEventRewriter discards all keyboard events mapped by the spoken
-// feedback manifest commands block. It dispatches the associated command name
-// directly to spoken feedback. This only occurs whenever spoken feedback is
-// enabled.
-class SpokenFeedbackEventRewriter : public ui::EventRewriter {
- public:
- explicit SpokenFeedbackEventRewriter(
- SpokenFeedbackEventRewriterDelegate* delegate);
- ~SpokenFeedbackEventRewriter() override;
-
- // EventRewriter:
- ui::EventRewriteStatus RewriteEvent(
- const ui::Event& event,
- scoped_ptr<ui::Event>* new_event) override;
- ui::EventRewriteStatus NextDispatchEvent(
- const ui::Event& last_event,
- scoped_ptr<ui::Event>* new_event) override;
-
- private:
- // Default delegate implementation.
- SpokenFeedbackEventRewriterDelegate default_delegate_;
-
- // Active delegate (used for testing).
- SpokenFeedbackEventRewriterDelegate* delegate_;
-
- // Stores all key codes we've captured.
- std::vector<int> captured_key_codes_;
-
- DISALLOW_COPY_AND_ASSIGN(SpokenFeedbackEventRewriter);
-};
-
-#endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_H_
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698