Commit 8989f098 authored by Miyoung Shin's avatar Miyoung Shin Committed by Commit Bot

Convert KeyboardLockService client to use BrowserInterfaceBroker

This change converts KeyboardLockService mojom interface client in
blink to use BrowserInterfaceBroker.

Bug: 936482
Change-Id: I3e6e2e6cb1c50bd83d6f8ccea881c546150eae54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816073
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700110}
parent 50c82245
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "content/browser/content_index/content_index_service_impl.h" #include "content/browser/content_index/content_index_service_impl.h"
#include "content/browser/frame_host/render_frame_host_impl.h" #include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/image_capture/image_capture_impl.h" #include "content/browser/image_capture/image_capture_impl.h"
#include "content/browser/keyboard_lock/keyboard_lock_service_impl.h"
#include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/screen_enumeration/screen_enumeration_impl.h" #include "content/browser/screen_enumeration/screen_enumeration_impl.h"
#include "content/browser/service_worker/service_worker_provider_host.h" #include "content/browser/service_worker/service_worker_provider_host.h"
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
#include "third_party/blink/public/mojom/credentialmanager/credential_manager.mojom.h" #include "third_party/blink/public/mojom/credentialmanager/credential_manager.mojom.h"
#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" #include "third_party/blink/public/mojom/filesystem/file_system.mojom.h"
#include "third_party/blink/public/mojom/idle/idle_manager.mojom.h" #include "third_party/blink/public/mojom/idle/idle_manager.mojom.h"
#include "third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom.h"
#include "third_party/blink/public/mojom/locks/lock_manager.mojom.h" #include "third_party/blink/public/mojom/locks/lock_manager.mojom.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom.h" #include "third_party/blink/public/mojom/permissions/permission.mojom.h"
#include "third_party/blink/public/mojom/presentation/presentation.mojom.h" #include "third_party/blink/public/mojom/presentation/presentation.mojom.h"
...@@ -130,6 +132,8 @@ void PopulateBinderMapWithContext( ...@@ -130,6 +132,8 @@ void PopulateBinderMapWithContext(
base::BindRepeating(&BackgroundFetchServiceImpl::CreateForFrame)); base::BindRepeating(&BackgroundFetchServiceImpl::CreateForFrame));
map->Add<blink::mojom::ContentIndexService>( map->Add<blink::mojom::ContentIndexService>(
base::BindRepeating(&ContentIndexServiceImpl::CreateForFrame)); base::BindRepeating(&ContentIndexServiceImpl::CreateForFrame));
map->Add<blink::mojom::KeyboardLockService>(
base::BindRepeating(&KeyboardLockServiceImpl::CreateMojoService));
GetContentClient()->browser()->RegisterBrowserInterfaceBindersForFrame(map); GetContentClient()->browser()->RegisterBrowserInterfaceBindersForFrame(map);
} }
......
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
#include "content/browser/geolocation/geolocation_service_impl.h" #include "content/browser/geolocation/geolocation_service_impl.h"
#include "content/browser/installedapp/installed_app_provider_impl_default.h" #include "content/browser/installedapp/installed_app_provider_impl_default.h"
#include "content/browser/interface_provider_filtering.h" #include "content/browser/interface_provider_filtering.h"
#include "content/browser/keyboard_lock/keyboard_lock_service_impl.h"
#include "content/browser/loader/navigation_url_loader_impl.h" #include "content/browser/loader/navigation_url_loader_impl.h"
#include "content/browser/loader/prefetch_url_loader_service.h" #include "content/browser/loader/prefetch_url_loader_service.h"
#include "content/browser/log_console_message.h" #include "content/browser/log_console_message.h"
...@@ -4393,9 +4392,6 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() { ...@@ -4393,9 +4392,6 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
GetProcess()->GetID(), GetRoutingID())); GetProcess()->GetID(), GetRoutingID()));
#endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
registry_->AddInterface(base::BindRepeating(
&KeyboardLockServiceImpl::CreateMojoService, base::Unretained(this)));
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
if (command_line->HasSwitch( if (command_line->HasSwitch(
switches::kEnableExperimentalWebPlatformFeatures)) { switches::kEnableExperimentalWebPlatformFeatures)) {
......
...@@ -222,7 +222,6 @@ const service_manager::Manifest& GetContentBrowserManifest() { ...@@ -222,7 +222,6 @@ const service_manager::Manifest& GetContentBrowserManifest() {
"blink.mojom.GeolocationService", "blink.mojom.GeolocationService",
"blink.mojom.IDBFactory", "blink.mojom.IDBFactory",
"blink.mojom.InsecureInputService", "blink.mojom.InsecureInputService",
"blink.mojom.KeyboardLockService",
"blink.mojom.MediaDevicesDispatcherHost", "blink.mojom.MediaDevicesDispatcherHost",
"blink.mojom.MediaStreamDispatcherHost", "blink.mojom.MediaStreamDispatcherHost",
"blink.mojom.MediaSessionService", "blink.mojom.MediaSessionService",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "third_party/blink/renderer/modules/keyboard/keyboard_layout.h" #include "third_party/blink/renderer/modules/keyboard/keyboard_layout.h"
#include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/common/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
...@@ -80,7 +80,7 @@ bool KeyboardLayout::EnsureServiceConnected() { ...@@ -80,7 +80,7 @@ bool KeyboardLayout::EnsureServiceConnected() {
if (!frame) { if (!frame) {
return false; return false;
} }
frame->GetInterfaceProvider().GetInterface( frame->GetBrowserInterfaceBroker().GetInterface(
service_.BindNewPipeAndPassReceiver()); service_.BindNewPipeAndPassReceiver());
DCHECK(service_); DCHECK(service_);
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "third_party/blink/renderer/modules/keyboard/keyboard_lock.h" #include "third_party/blink/renderer/modules/keyboard/keyboard_lock.h"
#include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/common/browser_interface_broker_proxy.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h" #include "third_party/blink/renderer/core/dom/dom_exception.h"
...@@ -100,7 +100,7 @@ bool KeyboardLock::EnsureServiceConnected() { ...@@ -100,7 +100,7 @@ bool KeyboardLock::EnsureServiceConnected() {
return false; return false;
} }
// See https://bit.ly/2S0zRAS for task types. // See https://bit.ly/2S0zRAS for task types.
frame->GetInterfaceProvider().GetInterface( frame->GetBrowserInterfaceBroker().GetInterface(
service_.BindNewPipeAndPassReceiver( service_.BindNewPipeAndPassReceiver(
frame->GetTaskRunner(TaskType::kMiscPlatformAPI))); frame->GetTaskRunner(TaskType::kMiscPlatformAPI)));
DCHECK(service_); DCHECK(service_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment