diff options
Diffstat (limited to 'mash')
-rw-r--r-- | mash/browser_driver/browser_driver_application_delegate.cc | 4 | ||||
-rw-r--r-- | mash/shelf/shelf_view.cc | 7 | ||||
-rw-r--r-- | mash/wm/accelerator_registrar_apptest.cc | 4 |
3 files changed, 4 insertions, 11 deletions
diff --git a/mash/browser_driver/browser_driver_application_delegate.cc b/mash/browser_driver/browser_driver_application_delegate.cc index 62fdccf..8e1b633 100644 --- a/mash/browser_driver/browser_driver_application_delegate.cc +++ b/mash/browser_driver/browser_driver_application_delegate.cc @@ -84,14 +84,12 @@ void BrowserDriverApplicationDelegate::AddAccelerators() { if (binding_.is_bound()) binding_.Unbind(); - mus::mojom::AcceleratorHandlerPtr handler; - binding_.Bind(GetProxy(&handler)); // If the window manager restarts, the handler pipe will close and we'll need // to re-add our accelerators when the window manager comes back up. binding_.set_connection_error_handler( base::Bind(&BrowserDriverApplicationDelegate::AddAccelerators, base::Unretained(this))); - registrar->SetHandler(std::move(handler)); + registrar->SetHandler(binding_.CreateInterfacePtrAndBind()); for (const AcceleratorSpec& spec : g_spec) { registrar->AddAccelerator( diff --git a/mash/shelf/shelf_view.cc b/mash/shelf/shelf_view.cc index c477aac..d25f48c 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)); diff --git a/mash/wm/accelerator_registrar_apptest.cc b/mash/wm/accelerator_registrar_apptest.cc index 083f8c8..5f8aa06 100644 --- a/mash/wm/accelerator_registrar_apptest.cc +++ b/mash/wm/accelerator_registrar_apptest.cc @@ -29,9 +29,7 @@ class TestAcceleratorHandler : public AcceleratorHandler { : binding_(this), registrar_(std::move(registrar)), add_accelerator_result_(false) { - AcceleratorHandlerPtr handler; - binding_.Bind(GetProxy(&handler)); - registrar_->SetHandler(std::move(handler)); + registrar_->SetHandler(binding_.CreateInterfacePtrAndBind()); } ~TestAcceleratorHandler() override {} |