Commit 7ca9f317 authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

Remove blink::PushController, not needed now with blink::PushMessagingClient

Now that we have blink::PushMessagingClient, which is also frame-bound,
we no longer need this helper class since we'll communicate over mojo
right from Blink, without needing to interact with //content at all.

Thus, we can remove this class, as it's no longer used anywhere.

Bug: 939943
Change-Id: I41528d3c7048040b2cf854ee7991f0a21e8b6e1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1631595
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666255}
parent 146fc8cf
...@@ -6,8 +6,6 @@ import("//third_party/blink/renderer/modules/modules.gni") ...@@ -6,8 +6,6 @@ import("//third_party/blink/renderer/modules/modules.gni")
blink_modules_sources("push_messaging") { blink_modules_sources("push_messaging") {
sources = [ sources = [
"push_controller.cc",
"push_controller.h",
"push_error.cc", "push_error.cc",
"push_error.h", "push_error.h",
"push_event.cc", "push_event.cc",
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/push_messaging/push_controller.h"
#include "third_party/blink/public/platform/modules/push_messaging/web_push_client.h"
#include "third_party/blink/renderer/platform/wtf/assertions.h"
namespace blink {
PushController::PushController(LocalFrame& frame, WebPushClient* client)
: Supplement<LocalFrame>(frame), client_(client) {}
WebPushClient& PushController::ClientFrom(LocalFrame* frame) {
PushController* controller = PushController::From(frame);
DCHECK(controller);
WebPushClient* client = controller->Client();
DCHECK(client);
return *client;
}
const char PushController::kSupplementName[] = "PushController";
void ProvidePushControllerTo(LocalFrame& frame, WebPushClient* client) {
PushController::ProvideTo(
frame, MakeGarbageCollected<PushController>(frame, client));
}
} // namespace blink
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_PUSH_MESSAGING_PUSH_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_PUSH_MESSAGING_PUSH_CONTROLLER_H_
#include "base/macros.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/supplementable.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
namespace blink {
class WebPushClient;
class PushController final : public GarbageCollected<PushController>,
public Supplement<LocalFrame> {
USING_GARBAGE_COLLECTED_MIXIN(PushController);
public:
static const char kSupplementName[];
PushController(LocalFrame& frame, WebPushClient* client);
static PushController* From(LocalFrame* frame) {
return Supplement<LocalFrame>::From<PushController>(frame);
}
static WebPushClient& ClientFrom(LocalFrame*);
void Trace(blink::Visitor* visitor) override {
Supplement<LocalFrame>::Trace(visitor);
}
private:
WebPushClient* Client() const { return client_; }
WebPushClient* client_;
DISALLOW_COPY_AND_ASSIGN(PushController);
};
MODULES_EXPORT void ProvidePushControllerTo(LocalFrame& frame,
WebPushClient* client);
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PUSH_MESSAGING_PUSH_CONTROLLER_H_
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