| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ |
| 6 #define CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ | 6 #define CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 zoom_level_changed_callbacks_; | 142 zoom_level_changed_callbacks_; |
| 143 | 143 |
| 144 // Copy of the pref data, so that we can read it on the IO thread. | 144 // Copy of the pref data, so that we can read it on the IO thread. |
| 145 HostZoomLevels host_zoom_levels_; | 145 HostZoomLevels host_zoom_levels_; |
| 146 SchemeHostZoomLevels scheme_host_zoom_levels_; | 146 SchemeHostZoomLevels scheme_host_zoom_levels_; |
| 147 double default_zoom_level_; | 147 double default_zoom_level_; |
| 148 | 148 |
| 149 // Page scale factor data for each renderer. | 149 // Page scale factor data for each renderer. |
| 150 ViewPageScaleFactorsAreOne view_page_scale_factors_are_one_; | 150 ViewPageScaleFactorsAreOne view_page_scale_factors_are_one_; |
| 151 | 151 |
| 152 // Don't expect more than a couple of tabs that are using a temporary zoom | |
| 153 // level, so vector is fine for now. | |
| 154 TemporaryZoomLevels temporary_zoom_levels_; | 152 TemporaryZoomLevels temporary_zoom_levels_; |
| 155 | 153 |
| 156 // Used around accesses to |host_zoom_levels_|, |default_zoom_level_|, | 154 // Used around accesses to |host_zoom_levels_|, |default_zoom_level_|, |
| 157 // |temporary_zoom_levels_|, and |view_page_scale_factors_are_one_| to | 155 // |temporary_zoom_levels_|, and |view_page_scale_factors_are_one_| to |
| 158 // guarantee thread safety. | 156 // guarantee thread safety. |
| 159 mutable base::Lock lock_; | 157 mutable base::Lock lock_; |
| 160 | 158 |
| 161 NotificationRegistrar registrar_; | 159 NotificationRegistrar registrar_; |
| 162 | 160 |
| 163 DISALLOW_COPY_AND_ASSIGN(HostZoomMapImpl); | 161 DISALLOW_COPY_AND_ASSIGN(HostZoomMapImpl); |
| 164 }; | 162 }; |
| 165 | 163 |
| 166 } // namespace content | 164 } // namespace content |
| 167 | 165 |
| 168 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ | 166 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ |
| OLD | NEW |