OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/host_zoom_level_context.h" |
| 6 |
| 7 #include "content/browser/host_zoom_map_impl.h" |
| 8 |
| 9 namespace content { |
| 10 |
| 11 HostZoomLevelContext::HostZoomLevelContext(ZoomLevelPrefsDelegate* delegate, |
| 12 const base::FilePath& file_path, |
| 13 double default_zoom_level) |
| 14 : host_zoom_map_impl_(new HostZoomMapImpl(default_zoom_level)), |
| 15 delegate_(delegate) { |
| 16 if (delegate_) |
| 17 delegate_->InitZoomLevels(file_path, host_zoom_map_impl_.get()); |
| 18 } |
| 19 |
| 20 HostZoomLevelContext::~HostZoomLevelContext() { |
| 21 // This needs to be released before the destructor for the HostZoomMapImpl |
| 22 // is called. |
| 23 delegate_ = NULL; |
| 24 } |
| 25 |
| 26 } // namespace content |
OLD | NEW |