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

Unified Diff: ui/compositor/layer_owner.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer_animation_element.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_owner.cc
diff --git a/ui/compositor/layer_owner.cc b/ui/compositor/layer_owner.cc
index d874b4769f184d196edd39512ebfd65eb9f18ed1..c9180810ebdc94a818305256a7cdcd7c5fc3e655 100644
--- a/ui/compositor/layer_owner.cc
+++ b/ui/compositor/layer_owner.cc
@@ -4,6 +4,8 @@
#include "ui/compositor/layer_owner.h"
+#include <utility>
+
#include "ui/compositor/layer_owner_delegate.h"
namespace ui {
@@ -24,13 +26,13 @@ void LayerOwner::SetLayer(Layer* layer) {
scoped_ptr<Layer> LayerOwner::AcquireLayer() {
if (layer_owner_)
layer_owner_->owner_ = NULL;
- return layer_owner_.Pass();
+ return std::move(layer_owner_);
}
scoped_ptr<Layer> LayerOwner::RecreateLayer() {
scoped_ptr<ui::Layer> old_layer(AcquireLayer());
if (!old_layer)
- return old_layer.Pass();
+ return old_layer;
LayerDelegate* old_delegate = old_layer->delegate();
old_layer->set_delegate(NULL);
@@ -79,7 +81,7 @@ scoped_ptr<Layer> LayerOwner::RecreateLayer() {
if (layer_owner_delegate_)
layer_owner_delegate_->OnLayerRecreated(old_layer.get(), new_layer);
- return old_layer.Pass();
+ return old_layer;
}
void LayerOwner::DestroyLayer() {
« no previous file with comments | « ui/compositor/layer_animation_element.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698