Commit 100226ae authored by Oksana Zhuravlova's avatar Oksana Zhuravlova Committed by Commit Bot

[mojo] Enable default InstalledAppProvider binder for Android

Since only Chrome binds InstalledAppProvider, but a default no-op
behaviour is expected for other embedders (tests, WebView, WebLayer),
this change removed the 'non-Android' condition for the default
InstalledAppProvider binder to avoid renderer termination for the
'no binder found' case.

Bug: 1064644, 1064827
Test: No crash when opening reddit.com in webview shell on an emulator
Change-Id: Ia9e6d98f0abff94929bf10dcd778166c90907f40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2124872Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755083}
parent 5c01bece
......@@ -84,6 +84,7 @@
#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom.h"
#include "third_party/blink/public/mojom/input/input_host.mojom.h"
#include "third_party/blink/public/mojom/insecure_input/insecure_input_service.mojom.h"
#include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h"
#include "third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom.h"
#include "third_party/blink/public/mojom/loader/navigation_predictor.mojom.h"
#include "third_party/blink/public/mojom/locks/lock_manager.mojom.h"
......@@ -117,7 +118,6 @@
#include "content/browser/installedapp/installed_app_provider_impl.h"
#include "content/public/common/content_switches.h"
#include "third_party/blink/public/mojom/hid/hid.mojom.h"
#include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h"
#include "third_party/blink/public/mojom/serial/serial.mojom.h"
#endif
......@@ -630,6 +630,10 @@ void PopulateFrameBinders(RenderFrameHostImpl* host,
base::Unretained(host)));
}
map->Add<blink::mojom::InstalledAppProvider>(
base::BindRepeating(&RenderFrameHostImpl::CreateInstalledAppProvider,
base::Unretained(host)));
#if defined(OS_ANDROID)
if (base::FeatureList::IsEnabled(features::kWebNfc)) {
map->Add<device::mojom::NFC>(base::BindRepeating(
......@@ -639,10 +643,6 @@ void PopulateFrameBinders(RenderFrameHostImpl* host,
map->Add<blink::mojom::HidService>(base::BindRepeating(
&RenderFrameHostImpl::GetHidService, base::Unretained(host)));
map->Add<blink::mojom::InstalledAppProvider>(
base::BindRepeating(&RenderFrameHostImpl::CreateInstalledAppProvider,
base::Unretained(host)));
map->Add<blink::mojom::SerialService>(base::BindRepeating(
&RenderFrameHostImpl::BindSerialService, base::Unretained(host)));
#endif // !defined(OS_ANDROID)
......
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