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

Side by Side Diff: ui/aura/window.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 unified diff | Download patch
« no previous file with comments | « ui/aura/test/env_test_helper.h ('k') | ui/aura/window_event_dispatcher_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
15 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
16 #include "ui/aura/client/capture_client.h" 17 #include "ui/aura/client/capture_client.h"
17 #include "ui/aura/client/cursor_client.h" 18 #include "ui/aura/client/cursor_client.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // If we're changing to a new layout manager, ensure it is aware of all the 285 // If we're changing to a new layout manager, ensure it is aware of all the
285 // existing child windows. 286 // existing child windows.
286 for (Windows::const_iterator it = children_.begin(); 287 for (Windows::const_iterator it = children_.begin();
287 it != children_.end(); 288 it != children_.end();
288 ++it) 289 ++it)
289 layout_manager_->OnWindowAddedToLayout(*it); 290 layout_manager_->OnWindowAddedToLayout(*it);
290 } 291 }
291 292
292 scoped_ptr<ui::EventTargeter> 293 scoped_ptr<ui::EventTargeter>
293 Window::SetEventTargeter(scoped_ptr<ui::EventTargeter> targeter) { 294 Window::SetEventTargeter(scoped_ptr<ui::EventTargeter> targeter) {
294 scoped_ptr<ui::EventTargeter> old_targeter = targeter_.Pass(); 295 scoped_ptr<ui::EventTargeter> old_targeter = std::move(targeter_);
295 targeter_ = targeter.Pass(); 296 targeter_ = std::move(targeter);
296 return old_targeter.Pass(); 297 return old_targeter;
297 } 298 }
298 299
299 void Window::SetBounds(const gfx::Rect& new_bounds) { 300 void Window::SetBounds(const gfx::Rect& new_bounds) {
300 if (parent_ && parent_->layout_manager()) 301 if (parent_ && parent_->layout_manager())
301 parent_->layout_manager()->SetChildBounds(this, new_bounds); 302 parent_->layout_manager()->SetChildBounds(this, new_bounds);
302 else { 303 else {
303 // Ensure we don't go smaller than our minimum bounds. 304 // Ensure we don't go smaller than our minimum bounds.
304 gfx::Rect final_bounds(new_bounds); 305 gfx::Rect final_bounds(new_bounds);
305 if (delegate_) { 306 if (delegate_) {
306 const gfx::Size& min_size = delegate_->GetMinimumSize(); 307 const gfx::Size& min_size = delegate_->GetMinimumSize();
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 layer_name = "Unnamed Window"; 1109 layer_name = "Unnamed Window";
1109 1110
1110 if (id_ != -1) 1111 if (id_ != -1)
1111 layer_name += " " + base::IntToString(id_); 1112 layer_name += " " + base::IntToString(id_);
1112 1113
1113 layer()->set_name(layer_name); 1114 layer()->set_name(layer_name);
1114 #endif 1115 #endif
1115 } 1116 }
1116 1117
1117 } // namespace aura 1118 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/env_test_helper.h ('k') | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698