OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 5 #ifndef CHROME_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
6 #define CHROME_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 6 #define CHROME_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 AcceleratorTarget* target); | 250 AcceleratorTarget* target); |
251 | 251 |
252 // Unregister the specified keyboard accelerator for the specified target. | 252 // Unregister the specified keyboard accelerator for the specified target. |
253 void UnregisterAccelerator(const Accelerator& accelerator, | 253 void UnregisterAccelerator(const Accelerator& accelerator, |
254 AcceleratorTarget* target); | 254 AcceleratorTarget* target); |
255 | 255 |
256 // Unregister all keyboard accelerator for the specified target. | 256 // Unregister all keyboard accelerator for the specified target. |
257 void UnregisterAccelerators(AcceleratorTarget* target); | 257 void UnregisterAccelerators(AcceleratorTarget* target); |
258 | 258 |
259 // Activate the target associated with the specified accelerator if any. | 259 // Activate the target associated with the specified accelerator if any. |
260 // If |prioritary_accelerators_only| is true, only the following accelerators | |
261 // are allowed: | |
262 // - a key combination including Ctrl or Alt | |
263 // - the escape key | |
264 // - the enter key | |
265 // - any F key (F1, F2, F3 ...) | |
266 // - any browser specific keys (as available on special keyboards) | |
267 // Returns true if an accelerator was activated. | 260 // Returns true if an accelerator was activated. |
268 bool ProcessAccelerator(const Accelerator& accelerator, | 261 bool ProcessAccelerator(const Accelerator& accelerator); |
269 bool prioritary_accelerators_only); | |
270 | 262 |
271 // NotificationObserver method. | 263 // NotificationObserver method. |
272 void Observe(NotificationType type, | 264 void Observe(NotificationType type, |
273 const NotificationSource& source, | 265 const NotificationSource& source, |
274 const NotificationDetails& details); | 266 const NotificationDetails& details); |
275 | 267 |
276 void AddKeystrokeListener(KeystrokeListener* listener); | 268 void AddKeystrokeListener(KeystrokeListener* listener); |
277 void RemoveKeystrokeListener(KeystrokeListener* listener); | 269 void RemoveKeystrokeListener(KeystrokeListener* listener); |
278 | 270 |
279 // Adds/removes a listener. The FocusChangeListener is notified every time | 271 // Adds/removes a listener. The FocusChangeListener is notified every time |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 // The list of registered FocusChange listeners. | 331 // The list of registered FocusChange listeners. |
340 typedef std::vector<FocusChangeListener*> FocusChangeListenerList; | 332 typedef std::vector<FocusChangeListener*> FocusChangeListenerList; |
341 FocusChangeListenerList focus_change_listeners_; | 333 FocusChangeListenerList focus_change_listeners_; |
342 | 334 |
343 DISALLOW_COPY_AND_ASSIGN(FocusManager); | 335 DISALLOW_COPY_AND_ASSIGN(FocusManager); |
344 }; | 336 }; |
345 | 337 |
346 } // namespace views | 338 } // namespace views |
347 | 339 |
348 #endif // CHROME_VIEWS_FOCUS_MANAGER_H_ | 340 #endif // CHROME_VIEWS_FOCUS_MANAGER_H_ |
OLD | NEW |