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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2865653002: [Device Service] Decouple NFC implementation from //content (Closed)
Patch Set: extra fix Created 3 years, 7 months 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c4e6c16e2400196297b13bc18475af672e2d3247..7603d96b31e322cb36c362cd86349361293ac987 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2628,6 +2628,12 @@ device::mojom::WakeLockContext* WebContentsImpl::GetWakeLockServiceContext() {
return wake_lock_context_host_->GetWakeLockContext();
}
+void WebContentsImpl::GetNFC(device::nfc::mojom::NFCRequest request) {
+ if (!nfc_host_)
+ nfc_host_.reset(new NFCHost(this));
+ nfc_host_->GetNFC(std::move(request));
+}
+
void WebContentsImpl::OnShowValidationMessage(
RenderViewHostImpl* source,
const gfx::Rect& anchor_in_root_view,
@@ -4318,10 +4324,6 @@ void WebContentsImpl::RenderFrameCreated(RenderFrameHost* render_frame_host) {
render_frame_host->Send(
new FrameMsg_EnableViewSourceMode(render_frame_host->GetRoutingID()));
}
-#if defined(OS_ANDROID)
- render_frame_host->GetInterfaceRegistry()->AddInterface(
- GetJavaInterfaces()->CreateInterfaceFactory<device::nfc::mojom::NFC>());
-#endif
}
void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) {

Powered by Google App Engine
This is Rietveld 408576698