OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 5 #ifndef UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/singleton.h" | 14 #include "base/singleton.h" |
15 #include "gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
16 #include "ui/views/events/accelerator.h" | 16 #include "ui/views/events/accelerator.h" |
17 | 17 |
18 // The FocusManager class is used to handle focus traversal, store/restore | 18 // The FocusManager class is used to handle focus traversal, store/restore |
19 // focused views and handle keyboard accelerators. | 19 // focused views and handle keyboard accelerators. |
20 // | 20 // |
21 // There are 2 types of focus: | 21 // There are 2 types of focus: |
22 // - the native focus, which is the focus that an gfx::NativeView has. | 22 // - the native focus, which is the focus that an gfx::NativeView has. |
23 // - the view focus, which is the focus that a views::View has. | 23 // - the view focus, which is the focus that a views::View has. |
24 // | 24 // |
25 // Each native view must register with their Focus Manager so the focus manager | 25 // Each native view must register with their Focus Manager so the focus manager |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 ~AutoNativeNotificationDisabler() { | 328 ~AutoNativeNotificationDisabler() { |
329 FocusManager::GetWidgetFocusManager()->EnableNotifications(); | 329 FocusManager::GetWidgetFocusManager()->EnableNotifications(); |
330 } | 330 } |
331 private: | 331 private: |
332 DISALLOW_COPY_AND_ASSIGN(AutoNativeNotificationDisabler); | 332 DISALLOW_COPY_AND_ASSIGN(AutoNativeNotificationDisabler); |
333 }; | 333 }; |
334 | 334 |
335 } // namespace ui | 335 } // namespace ui |
336 | 336 |
337 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 337 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
OLD | NEW |