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

Side by Side Diff: ash/sticky_keys/sticky_keys_controller.h

Issue 229053002: Revert of Fix sticky keys crash when handling synthetic events without a native event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/sticky_keys/sticky_keys_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ 5 #ifndef ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_
6 #define ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ 6 #define ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/sticky_keys/sticky_keys_state.h" 9 #include "ash/sticky_keys/sticky_keys_state.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // 140 //
141 // Here, (*) means key event will be consumed by StickyKeys, and (#) means event 141 // Here, (*) means key event will be consumed by StickyKeys, and (#) means event
142 // is modified. 142 // is modified.
143 class ASH_EXPORT StickyKeysHandler { 143 class ASH_EXPORT StickyKeysHandler {
144 public: 144 public:
145 class StickyKeysHandlerDelegate { 145 class StickyKeysHandlerDelegate {
146 public: 146 public:
147 StickyKeysHandlerDelegate(); 147 StickyKeysHandlerDelegate();
148 virtual ~StickyKeysHandlerDelegate(); 148 virtual ~StickyKeysHandlerDelegate();
149 149
150 // Dispatches keyboard event synchronously. |event| is an event that has 150 // Dispatches keyboard event synchronously.
151 // been previously dispatched.
152 virtual void DispatchKeyEvent(ui::KeyEvent* event, 151 virtual void DispatchKeyEvent(ui::KeyEvent* event,
153 aura::Window* target) = 0; 152 aura::Window* target) = 0;
154 153
155 // Dispatches mouse event synchronously. |event| is an event that has 154 // Dispatches mouse event synchronously.
156 // been previously dispatched.
157 virtual void DispatchMouseEvent(ui::MouseEvent* event, 155 virtual void DispatchMouseEvent(ui::MouseEvent* event,
158 aura::Window* target) = 0; 156 aura::Window* target) = 0;
159 157
160 // Dispatches scroll event synchronously. |event| is an event that has 158 // Dispatches scroll event synchronously.
161 // been previously dispatched.
162 virtual void DispatchScrollEvent(ui::ScrollEvent* event, 159 virtual void DispatchScrollEvent(ui::ScrollEvent* event,
163 aura::Window* target) = 0; 160 aura::Window* target) = 0;
164 }; 161 };
165 162
166 // This class takes an ownership of |delegate|. 163 // This class takes an ownership of |delegate|.
167 StickyKeysHandler(ui::EventFlags modifier_flag, 164 StickyKeysHandler(ui::EventFlags modifier_flag,
168 StickyKeysHandlerDelegate* delegate); 165 StickyKeysHandlerDelegate* delegate);
169 ~StickyKeysHandler(); 166 ~StickyKeysHandler();
170 167
171 // Handles key event. Returns true if key is consumed. 168 // Handles key event. Returns true if key is consumed.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 scoped_ptr<ui::KeyEvent> modifier_up_event_; 238 scoped_ptr<ui::KeyEvent> modifier_up_event_;
242 239
243 scoped_ptr<StickyKeysHandlerDelegate> delegate_; 240 scoped_ptr<StickyKeysHandlerDelegate> delegate_;
244 241
245 DISALLOW_COPY_AND_ASSIGN(StickyKeysHandler); 242 DISALLOW_COPY_AND_ASSIGN(StickyKeysHandler);
246 }; 243 };
247 244
248 } // namespace ash 245 } // namespace ash
249 246
250 #endif // ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_ 247 #endif // ASH_STICKY_KEYS_STICKY_KEYS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/sticky_keys/sticky_keys_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698