blob: 280aaa89379761a103c0d3770a99385fcb10f9d8 [file] [log] [blame]
// Copyright 2019 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 <memory>
#include "base/macros.h"
#include "base/strings/string16.h"
#include "components/infobars/core/infobar_delegate.h"
namespace send_tab_to_self {
class SendTabToSelfEntry;
// Delegate containing logic about what to display and how to behave
// in the SendTabToSelf infobar. Used across Android and iOS.
// TODO(
class SendTabToSelfInfoBarDelegate : public infobars::InfoBarDelegate {
static std::unique_ptr<SendTabToSelfInfoBarDelegate> Create(
const SendTabToSelfEntry* entry);
~SendTabToSelfInfoBarDelegate() override;
// Returns the message to be shown in the infobar.
base::string16 GetInfobarMessage() const;
// Opens a tab to the url of the shared |entry_|.
void OpenTab();
// InfoBarDelegate:
void InfoBarDismissed() override;
infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
SendTabToSelfInfoBarDelegate(const SendTabToSelfEntry* entry);
// The entry that was share to this device. Must outlive this instance.
const SendTabToSelfEntry* entry_ = nullptr;
} // namespace send_tab_to_self