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

Side by Side Diff: cc/blink/web_content_layer_impl.cc

Issue 2258833002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 | « cc/animation/transform_operations_unittest.cc ('k') | cc/debug/micro_benchmark_controller.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 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 #include "cc/blink/web_content_layer_impl.h" 5 #include "cc/blink/web_content_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return blink::WebContentLayerClient::DisplayListPaintingDisabled; 45 return blink::WebContentLayerClient::DisplayListPaintingDisabled;
46 case cc::ContentLayerClient::SUBSEQUENCE_CACHING_DISABLED: 46 case cc::ContentLayerClient::SUBSEQUENCE_CACHING_DISABLED:
47 return blink::WebContentLayerClient::SubsequenceCachingDisabled; 47 return blink::WebContentLayerClient::SubsequenceCachingDisabled;
48 } 48 }
49 NOTREACHED(); 49 NOTREACHED();
50 return blink::WebContentLayerClient::PaintDefaultBehavior; 50 return blink::WebContentLayerClient::PaintDefaultBehavior;
51 } 51 }
52 52
53 WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client) 53 WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client)
54 : client_(client) { 54 : client_(client) {
55 layer_ = base::WrapUnique(new WebLayerImpl(PictureLayer::Create(this))); 55 layer_ = base::MakeUnique<WebLayerImpl>(PictureLayer::Create(this));
56 layer_->layer()->SetIsDrawable(true); 56 layer_->layer()->SetIsDrawable(true);
57 } 57 }
58 58
59 WebContentLayerImpl::~WebContentLayerImpl() { 59 WebContentLayerImpl::~WebContentLayerImpl() {
60 static_cast<PictureLayer*>(layer_->layer())->ClearClient(); 60 static_cast<PictureLayer*>(layer_->layer())->ClearClient();
61 } 61 }
62 62
63 blink::WebLayer* WebContentLayerImpl::layer() { 63 blink::WebLayer* WebContentLayerImpl::layer() {
64 return layer_.get(); 64 return layer_.get();
65 } 65 }
(...skipping 20 matching lines...) Expand all
86 86
87 bool WebContentLayerImpl::FillsBoundsCompletely() const { 87 bool WebContentLayerImpl::FillsBoundsCompletely() const {
88 return false; 88 return false;
89 } 89 }
90 90
91 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const { 91 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const {
92 return client_->approximateUnsharedMemoryUsage(); 92 return client_->approximateUnsharedMemoryUsage();
93 } 93 }
94 94
95 } // namespace cc_blink 95 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/animation/transform_operations_unittest.cc ('k') | cc/debug/micro_benchmark_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698