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

Side by Side Diff: views/focus/focus_manager.h

Issue 5682008: Make members of Singleton<T> private and only visible to the singleton type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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
OLDNEW
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 VIEWS_FOCUS_FOCUS_MANAGER_H_ 5 #ifndef VIEWS_FOCUS_FOCUS_MANAGER_H_
6 #define VIEWS_FOCUS_FOCUS_MANAGER_H_ 6 #define 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>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 gfx::NativeView focused_now) = 0; 119 gfx::NativeView focused_now) = 0;
120 120
121 protected: 121 protected:
122 virtual ~WidgetFocusChangeListener() {} 122 virtual ~WidgetFocusChangeListener() {}
123 }; 123 };
124 124
125 class FocusManager { 125 class FocusManager {
126 public: 126 public:
127 class WidgetFocusManager { 127 class WidgetFocusManager {
128 public: 128 public:
129 // Returns the singleton instance.
130 static WidgetFocusManager* GetInstance();
131
129 // Adds/removes a WidgetFocusChangeListener |listener| to the set of 132 // Adds/removes a WidgetFocusChangeListener |listener| to the set of
130 // active listeners. 133 // active listeners.
131 void AddFocusChangeListener(WidgetFocusChangeListener* listener); 134 void AddFocusChangeListener(WidgetFocusChangeListener* listener);
132 void RemoveFocusChangeListener(WidgetFocusChangeListener* listener); 135 void RemoveFocusChangeListener(WidgetFocusChangeListener* listener);
133 136
134 // To be called when native-focus shifts from |focused_before| to 137 // To be called when native-focus shifts from |focused_before| to
135 // |focused_now|. 138 // |focused_now|.
136 // TODO(port) : Invocations to this routine are only implemented for 139 // TODO(port) : Invocations to this routine are only implemented for
137 // the Win32 platform. Calls need to be placed appropriately for 140 // the Win32 platform. Calls need to be placed appropriately for
138 // non-Windows environments. 141 // non-Windows environments.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 ~AutoNativeNotificationDisabler() { 335 ~AutoNativeNotificationDisabler() {
333 FocusManager::GetWidgetFocusManager()->EnableNotifications(); 336 FocusManager::GetWidgetFocusManager()->EnableNotifications();
334 } 337 }
335 private: 338 private:
336 DISALLOW_COPY_AND_ASSIGN(AutoNativeNotificationDisabler); 339 DISALLOW_COPY_AND_ASSIGN(AutoNativeNotificationDisabler);
337 }; 340 };
338 341
339 } // namespace views 342 } // namespace views
340 343
341 #endif // VIEWS_FOCUS_FOCUS_MANAGER_H_ 344 #endif // VIEWS_FOCUS_FOCUS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698