Commit 961393b5 authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

Remove Create() methods which use MakeGarbageCollected<> in modules/navigatorcontentutils

As advised in [1], this CL removes unnecessary Foo::Create() factory functions
which return an instance created by MakeGarbageCollected<Foo> in
//third_party/blink/renderer/modules/navigatorcontentutils, then this CL makes
the callers use MakeGarbageCollected<Foo> instead of Foo::Create() factory
functions.

[1] https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/iJ1bawbxbWs/vEdfT5QtBgAJ

Bug: 939691
Change-Id: Ib186b8359fc5f72ea26ebfa8587813177d5f13a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1556862Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#648584}
parent 95e14d64
......@@ -182,7 +182,7 @@ void ModulesInitializer::InstallSupplements(LocalFrame& frame) const {
ProvideLocalFileSystemTo(frame, std::make_unique<LocalFileSystemClient>());
NavigatorContentUtils::ProvideTo(
*frame.DomWindow()->navigator(),
NavigatorContentUtilsClient::Create(web_frame));
MakeGarbageCollected<NavigatorContentUtilsClient>(web_frame));
ScreenOrientationControllerImpl::ProvideTo(frame);
if (RuntimeEnabledFeatures::PresentationEnabled())
......
......@@ -10,11 +10,6 @@
namespace blink {
NavigatorContentUtilsClient* NavigatorContentUtilsClient::Create(
WebLocalFrameImpl* web_frame) {
return MakeGarbageCollected<NavigatorContentUtilsClient>(web_frame);
}
NavigatorContentUtilsClient::NavigatorContentUtilsClient(
WebLocalFrameImpl* web_frame)
: web_frame_(web_frame) {}
......
......@@ -17,8 +17,6 @@ class WebLocalFrameImpl;
class MODULES_EXPORT NavigatorContentUtilsClient
: public GarbageCollectedFinalized<NavigatorContentUtilsClient> {
public:
static NavigatorContentUtilsClient* Create(WebLocalFrameImpl*);
explicit NavigatorContentUtilsClient(WebLocalFrameImpl*);
virtual ~NavigatorContentUtilsClient() = default;
......
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