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

Unified Diff: mash/shelf/shelf_view.cc

Issue 1614553002: Reduce boilerplate needed to configure mojo::Binding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 11 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
Index: mash/shelf/shelf_view.cc
diff --git a/mash/shelf/shelf_view.cc b/mash/shelf/shelf_view.cc
index c477aac0360871d4f247cb1cc1d4f48ae14a51f6..d25f48ccb77de87c6ab606a32590d8378d9a5a33 100644
--- a/mash/shelf/shelf_view.cc
+++ b/mash/shelf/shelf_view.cc
@@ -18,11 +18,8 @@ namespace shelf {
ShelfView::ShelfView(mojo::ApplicationImpl* app) : binding_(this) {
app->ConnectToService("mojo:desktop_wm", &user_window_controller_);
- mash::wm::mojom::UserWindowObserverPtr observer;
- mojo::InterfaceRequest<mash::wm::mojom::UserWindowObserver> request =
- mojo::GetProxy(&observer);
- user_window_controller_->AddUserWindowObserver(std::move(observer));
- binding_.Bind(std::move(request));
+ user_window_controller_->AddUserWindowObserver(
+ binding_.CreateInterfacePtrAndBind());
SetLayoutManager(
new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));

Powered by Google App Engine
This is Rietveld 408576698