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

Unified Diff: mash/wm/window_manager_application.cc

Issue 1550693002: Global conversion of Pass()→std::move() on Linux (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 | « mash/wm/accelerator_registrar_impl.cc ('k') | mash/wm/window_manager_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/window_manager_application.cc
diff --git a/mash/wm/window_manager_application.cc b/mash/wm/window_manager_application.cc
index 2aef460912c5d6441f754b890e18b5067deaca49..414de004ac2d5fca4eef40ceba37363860a2dcf2 100644
--- a/mash/wm/window_manager_application.cc
+++ b/mash/wm/window_manager_application.cc
@@ -5,6 +5,7 @@
#include "mash/wm/window_manager_application.h"
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "components/mus/common/util.h"
@@ -82,8 +83,8 @@ void WindowManagerApplication::Initialize(mojo::ApplicationImpl* app) {
mojo::GetProxy(&window_manager)));
mus::mojom::WindowTreeHostClientPtr host_client;
host_client_binding_.Bind(GetProxy(&host_client));
- mus::CreateSingleWindowTreeHost(app, host_client.Pass(), this,
- &window_tree_host_, window_manager.Pass(),
+ mus::CreateSingleWindowTreeHost(app, std::move(host_client), this,
+ &window_tree_host_, std::move(window_manager),
window_manager_.get());
}
@@ -103,7 +104,7 @@ void WindowManagerApplication::OnAccelerator(uint32_t id,
default:
for (auto* registrar : accelerator_registrars_) {
if (registrar->OwnsAccelerator(id)) {
- registrar->ProcessAccelerator(id, event.Pass());
+ registrar->ProcessAccelerator(id, std::move(event));
break;
}
}
@@ -132,7 +133,8 @@ void WindowManagerApplication::OnEmbed(mus::Window* root) {
window_manager_->Initialize(this);
for (auto request : requests_)
- window_manager_binding_.AddBinding(window_manager_.get(), request->Pass());
+ window_manager_binding_.AddBinding(window_manager_.get(),
+ std::move(*request));
requests_.clear();
shadow_controller_.reset(new ShadowController(root->connection()));
@@ -158,7 +160,8 @@ void WindowManagerApplication::Create(
accelerator_registrar_count = 0;
}
accelerator_registrars_.insert(new AcceleratorRegistrarImpl(
- window_tree_host_.get(), ++accelerator_registrar_count, request.Pass(),
+ window_tree_host_.get(), ++accelerator_registrar_count,
+ std::move(request),
base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed,
base::Unretained(this))));
}
@@ -167,10 +170,11 @@ void WindowManagerApplication::Create(
mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mus::mojom::WindowManager> request) {
if (root_) {
- window_manager_binding_.AddBinding(window_manager_.get(), request.Pass());
+ window_manager_binding_.AddBinding(window_manager_.get(),
+ std::move(request));
} else {
- requests_.push_back(
- new mojo::InterfaceRequest<mus::mojom::WindowManager>(request.Pass()));
+ requests_.push_back(new mojo::InterfaceRequest<mus::mojom::WindowManager>(
+ std::move(request)));
}
}
« no previous file with comments | « mash/wm/accelerator_registrar_impl.cc ('k') | mash/wm/window_manager_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698