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

Unified Diff: ash/wm/window_state.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/window_state.h ('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 ac1ce8bcd173b72e9014fe7f9252aedfeeccf2c9..afd9441a8b0d833dbcbbaeba8081519b4623faa7 100644
--- a/ash/wm/window_state.cc
+++ b/ash/wm/window_state.cc
@@ -95,7 +95,7 @@ bool WindowState::HasDelegate() const {
return !!delegate_;
}
-void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) {
+void WindowState::SetDelegate(std::unique_ptr<WindowStateDelegate> delegate) {
DCHECK(!delegate_.get());
delegate_ = std::move(delegate);
}
@@ -283,10 +283,10 @@ void WindowState::ClearRestoreBounds() {
window_->ClearProperty(aura::client::kRestoreBoundsKey);
}
-scoped_ptr<WindowState::State> WindowState::SetStateObject(
- scoped_ptr<WindowState::State> new_state) {
+std::unique_ptr<WindowState::State> WindowState::SetStateObject(
+ std::unique_ptr<WindowState::State> new_state) {
current_state_->DetachState(this);
- scoped_ptr<WindowState::State> old_object = std::move(current_state_);
+ std::unique_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;
@@ -465,7 +465,7 @@ void WindowState::SetBoundsDirectCrossFade(const gfx::Rect& new_bounds) {
// cleaned up after the animation completes.
// Specify |set_bounds| to true here to keep the old bounds in the child
// windows of |window|.
- scoped_ptr<ui::LayerTreeOwner> old_layer_owner =
+ std::unique_ptr<ui::LayerTreeOwner> old_layer_owner =
::wm::RecreateLayers(window_);
ui::Layer* old_layer = old_layer_owner->root();
DCHECK(old_layer);
« no previous file with comments | « ash/wm/window_state.h ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698