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

Unified Diff: chrome/browser/chromeos/chrome_interface_factory.cc

Issue 2525563003: mash: Change CastConfigDelegate to a mojoified CastConfigClient. (Closed)
Patch Set: Now for the external apitests as well. Created 4 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
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 d6824f6fa48198e58ad61f820bdd0af1bd34375e..a9cdab7403ff892fd4e59d8ca89f5d6da60d67ef 100644
--- a/chrome/browser/chromeos/chrome_interface_factory.cc
+++ b/chrome/browser/chromeos/chrome_interface_factory.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/app_list/app_list_presenter_service.h"
#include "chrome/browser/ui/ash/ash_util.h"
+#include "chrome/browser/ui/ash/cast_config_client_media_router.h"
#include "chrome/browser/ui/ash/chrome_new_window_client.h"
#include "chrome/browser/ui/ash/keyboard_ui_service.h"
#include "chrome/browser/ui/ash/volume_controller_chromeos.h"
@@ -104,6 +105,13 @@ class FactoryImpl {
Get()->BindRequest(std::move(request));
}
+ void BindRequest(ash::mojom::CastConfigClientRequest request) {
+ if (!cast_config_client_)
+ cast_config_client_ = base::MakeUnique<CastConfigClientMediaRouter>();
+ cast_config_client_bindings_.AddBinding(cast_config_client_.get(),
+ std::move(request));
+ }
+
void BindRequest(keyboard::mojom::KeyboardRequest request) {
if (!keyboard_ui_service_)
keyboard_ui_service_ = base::MakeUnique<KeyboardUIService>();
@@ -146,6 +154,8 @@ class FactoryImpl {
std::unique_ptr<KeyboardUIService> keyboard_ui_service_;
mojo::BindingSet<keyboard::mojom::Keyboard> keyboard_bindings_;
std::unique_ptr<ChromeLaunchable> launchable_;
+ std::unique_ptr<CastConfigClientMediaRouter> cast_config_client_;
+ mojo::BindingSet<ash::mojom::CastConfigClient> cast_config_client_bindings_;
std::unique_ptr<ChromeNewWindowClient> new_window_client_;
mojo::BindingSet<ash::mojom::NewWindowClient> new_window_client_bindings_;
std::unique_ptr<VolumeController> volume_controller_;
@@ -177,6 +187,8 @@ bool ChromeInterfaceFactory::OnConnect(
main_thread_task_runner_);
FactoryImpl::AddFactory<mash::mojom::Launchable>(registry,
main_thread_task_runner_);
+ FactoryImpl::AddFactory<ash::mojom::CastConfigClient>(
+ registry, main_thread_task_runner_);
FactoryImpl::AddFactory<ash::mojom::NewWindowClient>(
registry, main_thread_task_runner_);
FactoryImpl::AddFactory<ash::mojom::VolumeController>(

Powered by Google App Engine
This is Rietveld 408576698