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

Side by Side Diff: ui/views/focus/widget_focus_manager.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
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 unified diff | Download patch
OLDNEW
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_WIDGET_FOCUS_MANAGER_H_ 5 #ifndef UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_
6 #define UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_ 6 #define UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // propagating notifications. 46 // propagating notifications.
47 void EnableNotifications() { enabled_ = true; } 47 void EnableNotifications() { enabled_ = true; }
48 void DisableNotifications() { enabled_ = false; } 48 void DisableNotifications() { enabled_ = false; }
49 49
50 private: 50 private:
51 friend struct DefaultSingletonTraits<WidgetFocusManager>; 51 friend struct DefaultSingletonTraits<WidgetFocusManager>;
52 52
53 WidgetFocusManager(); 53 WidgetFocusManager();
54 ~WidgetFocusManager(); 54 ~WidgetFocusManager();
55 55
56 ObserverList<WidgetFocusChangeListener> focus_change_listeners_; 56 base::ObserverList<WidgetFocusChangeListener> focus_change_listeners_;
57 57
58 bool enabled_; 58 bool enabled_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(WidgetFocusManager); 60 DISALLOW_COPY_AND_ASSIGN(WidgetFocusManager);
61 }; 61 };
62 62
63 // A basic helper class that is used to disable native focus change 63 // A basic helper class that is used to disable native focus change
64 // notifications within a scope. 64 // notifications within a scope.
65 class VIEWS_EXPORT AutoNativeNotificationDisabler { 65 class VIEWS_EXPORT AutoNativeNotificationDisabler {
66 public: 66 public:
67 AutoNativeNotificationDisabler(); 67 AutoNativeNotificationDisabler();
68 ~AutoNativeNotificationDisabler(); 68 ~AutoNativeNotificationDisabler();
69 69
70 private: 70 private:
71 DISALLOW_COPY_AND_ASSIGN(AutoNativeNotificationDisabler); 71 DISALLOW_COPY_AND_ASSIGN(AutoNativeNotificationDisabler);
72 }; 72 };
73 73
74 } // namespace views 74 } // namespace views
75 75
76 #endif // UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_ 76 #endif // UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/views/focus/focus_manager.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698