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

Side by Side Diff: content/browser/host_zoom_map_impl.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « content/browser/host_zoom_map_impl.h ('k') | content/browser/manifest/manifest_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/browser/host_zoom_map_impl.h" 5 #include "content/browser/host_zoom_map_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 double HostZoomMapImpl::GetDefaultZoomLevel() const { 274 double HostZoomMapImpl::GetDefaultZoomLevel() const {
275 DCHECK_CURRENTLY_ON(BrowserThread::UI); 275 DCHECK_CURRENTLY_ON(BrowserThread::UI);
276 return default_zoom_level_; 276 return default_zoom_level_;
277 } 277 }
278 278
279 void HostZoomMapImpl::SetDefaultZoomLevel(double level) { 279 void HostZoomMapImpl::SetDefaultZoomLevel(double level) {
280 DCHECK_CURRENTLY_ON(BrowserThread::UI); 280 DCHECK_CURRENTLY_ON(BrowserThread::UI);
281 default_zoom_level_ = level; 281 default_zoom_level_ = level;
282 } 282 }
283 283
284 scoped_ptr<HostZoomMap::Subscription> 284 std::unique_ptr<HostZoomMap::Subscription>
285 HostZoomMapImpl::AddZoomLevelChangedCallback( 285 HostZoomMapImpl::AddZoomLevelChangedCallback(
286 const ZoomLevelChangedCallback& callback) { 286 const ZoomLevelChangedCallback& callback) {
287 return zoom_level_changed_callbacks_.Add(callback); 287 return zoom_level_changed_callbacks_.Add(callback);
288 } 288 }
289 289
290 double HostZoomMapImpl::GetZoomLevelForWebContents( 290 double HostZoomMapImpl::GetZoomLevelForWebContents(
291 const WebContentsImpl& web_contents_impl) const { 291 const WebContentsImpl& web_contents_impl) const {
292 int render_process_id = web_contents_impl.GetRenderProcessHost()->GetID(); 292 int render_process_id = web_contents_impl.GetRenderProcessHost()->GetID();
293 int routing_id = web_contents_impl.GetRenderViewHost()->GetRoutingID(); 293 int routing_id = web_contents_impl.GetRenderViewHost()->GetRoutingID();
294 294
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 double error_page_zoom_level = GetZoomLevelForHost(host); 490 double error_page_zoom_level = GetZoomLevelForHost(host);
491 491
492 SendZoomLevelChange(std::string(), host, error_page_zoom_level); 492 SendZoomLevelChange(std::string(), host, error_page_zoom_level);
493 } 493 }
494 494
495 HostZoomMapImpl::~HostZoomMapImpl() { 495 HostZoomMapImpl::~HostZoomMapImpl() {
496 DCHECK_CURRENTLY_ON(BrowserThread::UI); 496 DCHECK_CURRENTLY_ON(BrowserThread::UI);
497 } 497 }
498 498
499 } // namespace content 499 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/host_zoom_map_impl.h ('k') | content/browser/manifest/manifest_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698