| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ | 5 #ifndef COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ |
| 6 #define COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ | 6 #define COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/callback_list.h" | 8 #include "base/callback_list.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // Get a weak ptr to be used by clients who may themselves be UserData for | 53 // Get a weak ptr to be used by clients who may themselves be UserData for |
| 54 // the context, since the order of destruction is undefined between the client | 54 // the context, since the order of destruction is undefined between the client |
| 55 // and this class. | 55 // and this class. |
| 56 base::WeakPtr<ZoomEventManager> GetWeakPtr() { | 56 base::WeakPtr<ZoomEventManager> GetWeakPtr() { |
| 57 return weak_ptr_factory_.GetWeakPtr(); | 57 return weak_ptr_factory_.GetWeakPtr(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 base::CallbackList<void(const content::HostZoomMap::ZoomLevelChange&)> | 61 base::CallbackList<void(const content::HostZoomMap::ZoomLevelChange&)> |
| 62 zoom_level_changed_callbacks_; | 62 zoom_level_changed_callbacks_; |
| 63 ObserverList<ZoomEventManagerObserver> observers_; | 63 base::ObserverList<ZoomEventManagerObserver> observers_; |
| 64 base::WeakPtrFactory<ZoomEventManager> weak_ptr_factory_; | 64 base::WeakPtrFactory<ZoomEventManager> weak_ptr_factory_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(ZoomEventManager); | 66 DISALLOW_COPY_AND_ASSIGN(ZoomEventManager); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace ui_zoom | 69 } // namespace ui_zoom |
| 70 | 70 |
| 71 #endif // COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ | 71 #endif // COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ |
| OLD | NEW |