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

Unified Diff: ash/wm/window_state.cc

Issue 1547223002: Convert Pass()→std::move() in //ash (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 | « ash/wm/window_animations.cc ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state.cc
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc
index b314c95336579081d17ae255f13b692a2a027b39..21a69d9750a58ab85405da6194db5656752ef210 100644
--- a/ash/wm/window_state.cc
+++ b/ash/wm/window_state.cc
@@ -4,6 +4,8 @@
#include "ash/wm/window_state.h"
+#include <utility>
+
#include "ash/ash_switches.h"
#include "ash/root_window_controller.h"
#include "ash/screen_util.h"
@@ -95,7 +97,7 @@ bool WindowState::HasDelegate() const {
void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) {
DCHECK(!delegate_.get());
- delegate_ = delegate.Pass();
+ delegate_ = std::move(delegate);
}
WindowStateType WindowState::GetStateType() const {
@@ -284,10 +286,10 @@ void WindowState::ClearRestoreBounds() {
scoped_ptr<WindowState::State> WindowState::SetStateObject(
scoped_ptr<WindowState::State> new_state) {
current_state_->DetachState(this);
- scoped_ptr<WindowState::State> old_object = current_state_.Pass();
- current_state_ = new_state.Pass();
+ scoped_ptr<WindowState::State> old_object = std::move(current_state_);
+ current_state_ = std::move(new_state);
current_state_->AttachState(this, old_object.get());
- return old_object.Pass();
+ return old_object;
}
void WindowState::SetPreAutoManageWindowBounds(
@@ -477,7 +479,7 @@ void WindowState::SetBoundsDirectCrossFade(const gfx::Rect& new_bounds) {
else
old_layer->parent()->StackAbove(new_layer, old_layer);
- CrossFadeAnimation(window_, old_layer_owner.Pass(), gfx::Tween::EASE_OUT);
+ CrossFadeAnimation(window_, std::move(old_layer_owner), gfx::Tween::EASE_OUT);
}
WindowState* GetActiveWindowState() {
« no previous file with comments | « ash/wm/window_animations.cc ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698