OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // SpokenFeedbackEventRewriter discards all keyboard events mapped by the spoken | 41 // SpokenFeedbackEventRewriter discards all keyboard events mapped by the spoken |
42 // feedback manifest commands block. It dispatches the associated command name | 42 // feedback manifest commands block. It dispatches the associated command name |
43 // directly to spoken feedback. This only occurs whenever spoken feedback is | 43 // directly to spoken feedback. This only occurs whenever spoken feedback is |
44 // enabled. | 44 // enabled. |
45 class SpokenFeedbackEventRewriter : public ui::EventRewriter { | 45 class SpokenFeedbackEventRewriter : public ui::EventRewriter { |
46 public: | 46 public: |
47 SpokenFeedbackEventRewriter(); | 47 SpokenFeedbackEventRewriter(); |
48 ~SpokenFeedbackEventRewriter() override; | 48 ~SpokenFeedbackEventRewriter() override; |
49 | 49 |
50 void SetDelegateForTest( | 50 void SetDelegateForTest( |
51 scoped_ptr<SpokenFeedbackEventRewriterDelegate> delegate); | 51 std::unique_ptr<SpokenFeedbackEventRewriterDelegate> delegate); |
52 | 52 |
53 private: | 53 private: |
54 // EventRewriter: | 54 // EventRewriter: |
55 ui::EventRewriteStatus RewriteEvent( | 55 ui::EventRewriteStatus RewriteEvent( |
56 const ui::Event& event, | 56 const ui::Event& event, |
57 scoped_ptr<ui::Event>* new_event) override; | 57 std::unique_ptr<ui::Event>* new_event) override; |
58 ui::EventRewriteStatus NextDispatchEvent( | 58 ui::EventRewriteStatus NextDispatchEvent( |
59 const ui::Event& last_event, | 59 const ui::Event& last_event, |
60 scoped_ptr<ui::Event>* new_event) override; | 60 std::unique_ptr<ui::Event>* new_event) override; |
61 | 61 |
62 // Active delegate (used for testing). | 62 // Active delegate (used for testing). |
63 scoped_ptr<SpokenFeedbackEventRewriterDelegate> delegate_; | 63 std::unique_ptr<SpokenFeedbackEventRewriterDelegate> delegate_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(SpokenFeedbackEventRewriter); | 65 DISALLOW_COPY_AND_ASSIGN(SpokenFeedbackEventRewriter); |
66 }; | 66 }; |
67 | 67 |
68 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_
H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPOKEN_FEEDBACK_EVENT_REWRITER_
H_ |
OLD | NEW |