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

Side by Side Diff: cc/layers/viewport.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 | « cc/layers/viewport.h ('k') | cc/output/begin_frame_args.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/layers/viewport.h" 5 #include "cc/layers/viewport.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h"
8 #include "cc/input/top_controls_manager.h" 9 #include "cc/input/top_controls_manager.h"
9 #include "cc/trees/layer_tree_host_impl.h" 10 #include "cc/trees/layer_tree_host_impl.h"
10 #include "cc/trees/layer_tree_impl.h" 11 #include "cc/trees/layer_tree_impl.h"
11 #include "ui/gfx/geometry/vector2d_conversions.h" 12 #include "ui/gfx/geometry/vector2d_conversions.h"
12 #include "ui/gfx/geometry/vector2d_f.h" 13 #include "ui/gfx/geometry/vector2d_f.h"
13 14
14 namespace cc { 15 namespace cc {
15 16
16 // static 17 // static
17 scoped_ptr<Viewport> Viewport::Create( 18 std::unique_ptr<Viewport> Viewport::Create(LayerTreeHostImpl* host_impl) {
18 LayerTreeHostImpl* host_impl) { 19 return base::WrapUnique(new Viewport(host_impl));
19 return make_scoped_ptr(new Viewport(host_impl));
20 } 20 }
21 21
22 Viewport::Viewport(LayerTreeHostImpl* host_impl) 22 Viewport::Viewport(LayerTreeHostImpl* host_impl)
23 : host_impl_(host_impl) 23 : host_impl_(host_impl)
24 , pinch_zoom_active_(false) { 24 , pinch_zoom_active_(false) {
25 DCHECK(host_impl_); 25 DCHECK(host_impl_);
26 } 26 }
27 27
28 void Viewport::Pan(const gfx::Vector2dF& delta) { 28 void Viewport::Pan(const gfx::Vector2dF& delta) {
29 gfx::Vector2dF pending_delta = delta; 29 gfx::Vector2dF pending_delta = delta;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 LayerImpl* Viewport::InnerScrollLayer() const { 234 LayerImpl* Viewport::InnerScrollLayer() const {
235 return host_impl_->InnerViewportScrollLayer(); 235 return host_impl_->InnerViewportScrollLayer();
236 } 236 }
237 237
238 LayerImpl* Viewport::OuterScrollLayer() const { 238 LayerImpl* Viewport::OuterScrollLayer() const {
239 return host_impl_->OuterViewportScrollLayer(); 239 return host_impl_->OuterViewportScrollLayer();
240 } 240 }
241 241
242 } // namespace cc 242 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/viewport.h ('k') | cc/output/begin_frame_args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698