diff options
Diffstat (limited to 'chrome/views/focus/view_storage.h')
-rw-r--r-- | chrome/views/focus/view_storage.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/views/focus/view_storage.h b/chrome/views/focus/view_storage.h index 7aac7bb..cb0cb67 100644 --- a/chrome/views/focus/view_storage.h +++ b/chrome/views/focus/view_storage.h @@ -6,6 +6,7 @@ #define CHROME_VIEWS_FOCUS_VIEW_STORAGE_H_ #include "base/singleton.h" +#include "chrome/common/notification_observer.h" #include "chrome/views/view.h" // This class is a simple storage place for storing/retrieving views. It is @@ -25,7 +26,7 @@ namespace views { struct ViewLocationInfo; -class ViewStorage { +class ViewStorage : public NotificationObserver { public: // Returns the global ViewStorage instance. // It is guaranted to be non NULL. @@ -43,15 +44,17 @@ class ViewStorage { // Removes the view associated with |storage_id| if any. void RemoveView(int storage_id); - // Notifies the ViewStorage that a view was removed from its parent somewhere. - void ViewRemoved(View* parent, View* removed); - private: friend struct DefaultSingletonTraits<ViewStorage>; ViewStorage(); ~ViewStorage(); + // NotificationObserver method. + void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); + // Removes the view associated with |storage_id|. If |remove_all_ids| is true, // all other mapping pointing to the same view are removed as well. void EraseView(int storage_id, bool remove_all_ids); |