Commit d0629110 authored by Abhijeet Kandalkar's avatar Abhijeet Kandalkar Committed by Commit Bot

Use new mojo types for third_party/blink/public/mojom/page/spatial_navigation.mojom

This CL convert .h/.cc to use new mojo types and port dependent files
to adopt new implementation.

Bug: 955171, 978694
Change-Id: I80bba8d7c1caa5597d1456371d4050b00968ac90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755797Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#687672}
parent 3743e5e4
......@@ -632,7 +632,7 @@ bool SpatialNavigationController::UpdateHasDefaultVideoControls(
return true;
}
const mojom::blink::SpatialNavigationHostPtr&
const mojo::Remote<mojom::blink::SpatialNavigationHost>&
SpatialNavigationController::GetSpatialNavigationHost() {
if (!spatial_navigation_host_.is_bound()) {
LocalFrame* frame = DynamicTo<LocalFrame>(page_->MainFrame());
......@@ -640,8 +640,8 @@ SpatialNavigationController::GetSpatialNavigationHost() {
return spatial_navigation_host_;
frame->GetInterfaceProvider().GetInterface(
mojo::MakeRequest(&spatial_navigation_host_,
frame->GetTaskRunner(TaskType::kMiscPlatformAPI)));
spatial_navigation_host_.BindNewPipeAndPassReceiver(
frame->GetTaskRunner(TaskType::kMiscPlatformAPI)));
}
return spatial_navigation_host_;
}
......
......@@ -5,6 +5,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SPATIAL_NAVIGATION_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SPATIAL_NAVIGATION_CONTROLLER_H_
#include "mojo/public/cpp/bindings/remote.h"
#include "third_party/blink/public/mojom/page/spatial_navigation.mojom-blink.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/page/spatial_navigation.h"
......@@ -105,7 +106,8 @@ class CORE_EXPORT SpatialNavigationController
bool UpdateIsFormFocused(Element* element);
bool UpdateHasDefaultVideoControls(Element* element);
const mojom::blink::SpatialNavigationHostPtr& GetSpatialNavigationHost();
const mojo::Remote<mojom::blink::SpatialNavigationHost>&
GetSpatialNavigationHost();
void ResetMojoBindings();
// The currently indicated element or nullptr if no node is indicated by
......@@ -119,7 +121,7 @@ class CORE_EXPORT SpatialNavigationController
bool enter_key_press_seen_ = false;
mojom::blink::SpatialNavigationStatePtr spatial_navigation_state_;
mojom::blink::SpatialNavigationHostPtr spatial_navigation_host_;
mojo::Remote<mojom::blink::SpatialNavigationHost> spatial_navigation_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