OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ash/common/mojo_interface_factory.h" |
| 6 |
| 7 #include "ash/common/system/tray/system_tray_controller.h" |
| 8 #include "ash/common/wm_shell.h" |
| 9 #include "base/bind.h" |
| 10 #include "services/shell/public/cpp/interface_registry.h" |
| 11 |
| 12 namespace ash { |
| 13 |
| 14 namespace { |
| 15 |
| 16 void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) { |
| 17 WmShell::Get()->system_tray_controller()->BindRequest(std::move(request)); |
| 18 } |
| 19 |
| 20 } // namespace |
| 21 |
| 22 // static |
| 23 void MojoInterfaceFactory::RegisterInterfaces( |
| 24 shell::InterfaceRegistry* registry, |
| 25 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { |
| 26 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), |
| 27 main_thread_task_runner); |
| 28 } |
| 29 |
| 30 } // namespace ash |
OLD | NEW |