chromium/chrome/browser/extensions/api/debugger/extension_dev_tools_infobar_delegate.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/extensions/api/debugger/extension_dev_tools_infobar_delegate.h"

#include <memory>
#include <string>
#include <utility>

#include "base/callback_list.h"
#include "base/functional/callback.h"
#include "base/lazy_instance.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/devtools/global_confirm_info_bar.h"
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/infobars/core/infobar_delegate.h"
#include "extensions/common/extension_id.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/text_constants.h"

namespace extensions {

namespace {

Delegates;
base::LazyInstance<Delegates>::Leaky g_delegates =;

}  // namespace

// static
constexpr base::TimeDelta ExtensionDevToolsInfoBarDelegate::kAutoCloseDelay;

base::CallbackListSubscription ExtensionDevToolsInfoBarDelegate::Create(
    const ExtensionId& extension_id,
    const std::string& extension_name,
    base::OnceClosure destroyed_callback) {}

ExtensionDevToolsInfoBarDelegate::~ExtensionDevToolsInfoBarDelegate() {}

infobars::InfoBarDelegate::InfoBarIdentifier
ExtensionDevToolsInfoBarDelegate::GetIdentifier() const {}

bool ExtensionDevToolsInfoBarDelegate::ShouldExpire(
    const NavigationDetails& details) const {}

// When rendering the text is being truncated to a 10000 characters (see
// https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/render_text_harfbuzz.cc;l=70-71;drc=736ed6e5da7f81505b547d4b03d31b30ed025a46).
// If the extension name is longer then this limit, the part of the text saying
// that "... is debugging the browser" would be truncated. To work this around
// enforce more modest limit on the name length here, so that the user will see
// '<end of extension name> is debugging the browser.
const size_t kMaxExtensionNameLength =;

std::u16string ExtensionDevToolsInfoBarDelegate::GetMessageText() const {}

gfx::ElideBehavior ExtensionDevToolsInfoBarDelegate::GetMessageElideBehavior()
    const {}

int ExtensionDevToolsInfoBarDelegate::GetButtons() const {}

ExtensionDevToolsInfoBarDelegate::ExtensionDevToolsInfoBarDelegate(
    ExtensionId extension_id,
    const std::string& extension_name)
    :{}

base::CallbackListSubscription
ExtensionDevToolsInfoBarDelegate::RegisterDestroyedCallback(
    base::OnceClosure destroyed_callback) {}

void ExtensionDevToolsInfoBarDelegate::MaybeStartAutocloseTimer() {}

}  // namespace extensions