Commit 6f156f86 authored by Shimi Zhang's avatar Shimi Zhang Committed by Commit Bot

Migrate few places in blink to use the new mojo syntax

This is a followup of http://crrev/c/1685837. See more at
https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E/edit

Bug: 955171
Change-Id: Ie98a786dbb61aa3feb7a5b7170a27f88c243c4b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1723020Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682798}
parent 1a4bfeda
......@@ -4011,7 +4011,7 @@ bool Document::CheckCompletedInternal() {
// Send the source ID of the document to the browser.
if (frame_->Client()->GetRemoteNavigationAssociatedInterfaces()) {
mojom::blink::UkmSourceIdFrameHostAssociatedPtr ukm_binding;
mojo::AssociatedRemote<mojom::blink::UkmSourceIdFrameHost> ukm_binding;
frame_->Client()->GetRemoteNavigationAssociatedInterfaces()->GetInterface(
&ukm_binding);
DCHECK(ukm_binding.is_bound());
......
......@@ -5,6 +5,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_VIEWPORT_DATA_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_VIEWPORT_DATA_H_
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "third_party/blink/public/mojom/page/display_cutout.mojom-blink.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/page/viewport_description.h"
......@@ -49,7 +50,7 @@ class ViewportData : public GarbageCollectedFinalized<ViewportData> {
mojom::ViewportFit viewport_fit_ = blink::mojom::ViewportFit::kAuto;
bool force_expand_display_cutout_ = false;
mojom::blink::DisplayCutoutHostAssociatedPtr display_cutout_host_;
mojo::AssociatedRemote<mojom::blink::DisplayCutoutHost> display_cutout_host_;
};
inline bool ViewportData::ShouldOverrideLegacyDescription(
......
......@@ -59,7 +59,7 @@ Document* PortalHost::GetDocument() const {
}
void PortalHost::OnPortalActivated() {
portal_host_ptr_.reset();
portal_host_.reset();
}
void PortalHost::postMessage(ScriptState* script_state,
......@@ -127,14 +127,14 @@ void PortalHost::ReceiveMessage(
}
mojom::blink::PortalHost& PortalHost::GetPortalHostInterface() {
if (!portal_host_ptr_) {
if (!portal_host_) {
DCHECK(GetDocument()->GetFrame());
GetDocument()
->GetFrame()
->GetRemoteNavigationAssociatedInterfaces()
->GetInterface(&portal_host_ptr_);
->GetInterface(&portal_host_);
}
return *portal_host_ptr_;
return *portal_host_.get();
}
} // namespace blink
......@@ -5,6 +5,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_PORTAL_PORTAL_HOST_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_PORTAL_PORTAL_HOST_H_
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "third_party/blink/public/mojom/portal/portal.mojom-blink.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/events/event_target.h"
......@@ -65,7 +66,7 @@ class CORE_EXPORT PortalHost : public EventTargetWithInlineData,
private:
mojom::blink::PortalHost& GetPortalHostInterface();
mojom::blink::PortalHostAssociatedPtr portal_host_ptr_;
mojo::AssociatedRemote<mojom::blink::PortalHost> portal_host_;
};
} // namespace blink
......
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