Chromium Code Reviews| Index: chrome/browser/chromeos/chrome_interface_factory.cc |
| diff --git a/chrome/browser/chromeos/chrome_interface_factory.cc b/chrome/browser/chromeos/chrome_interface_factory.cc |
| index 2a8fdb2242fa04b928215b70abfefbe8f8e14be6..1d5dabd421d94209a78ffb051076291aaf007f9c 100644 |
| --- a/chrome/browser/chromeos/chrome_interface_factory.cc |
| +++ b/chrome/browser/chromeos/chrome_interface_factory.cc |
| @@ -19,6 +19,7 @@ |
| #include "chrome/browser/ui/ash/chrome_wallpaper_manager.h" |
| #include "chrome/browser/ui/ash/keyboard_ui_service.h" |
| #include "chrome/browser/ui/ash/system_tray_client.h" |
| +#include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
| #include "chrome/browser/ui/browser_commands.h" |
| #include "chrome/browser/ui/browser_finder.h" |
| #include "content/public/common/service_manager_connection.h" |
| @@ -127,6 +128,12 @@ class FactoryImpl { |
| wallpaper_manager_->ProcessRequest(std::move(request)); |
| } |
| + void BindRequest(ash::mojom::VolumeControllerRequest request) { |
| + if (!volume_controller_) |
| + volume_controller_.reset(new VolumeController); |
|
sky
2016/10/19 15:26:39
MakeUnique if possible.
msw
2016/10/19 22:36:25
Done (here and elsewhere).
|
| + volume_controller_->BindRequest(std::move(request)); |
| + } |
| + |
| void BindRequest(app_list::mojom::AppListPresenterRequest request) { |
| if (!app_list_presenter_service_) |
| app_list_presenter_service_.reset(new AppListPresenterService); |
| @@ -141,6 +148,7 @@ class FactoryImpl { |
| std::unique_ptr<ChromeLaunchable> launchable_; |
| mojo::BindingSet<ash::mojom::SystemTrayClient> system_tray_client_bindings_; |
| std::unique_ptr<ChromeWallpaperManager> wallpaper_manager_; |
| + std::unique_ptr<VolumeController> volume_controller_; |
| std::unique_ptr<AppListPresenterService> app_list_presenter_service_; |
| mojo::BindingSet<app_list::mojom::AppListPresenter> |
| app_list_presenter_bindings_; |
| @@ -168,6 +176,8 @@ bool ChromeInterfaceFactory::OnConnect( |
| main_thread_task_runner_); |
| FactoryImpl::AddFactory<ash::mojom::SystemTrayClient>( |
| registry, main_thread_task_runner_); |
| + FactoryImpl::AddFactory<ash::mojom::VolumeController>( |
| + registry, main_thread_task_runner_); |
| FactoryImpl::AddFactory<ash::mojom::WallpaperManager>( |
| registry, main_thread_task_runner_); |
| FactoryImpl::AddFactory<app_list::mojom::AppListPresenter>( |