910e62b5创建于 1月15日历史提交
// 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 "extensions/shell/browser/shell_web_view_guest_delegate.h"

#include <optional>

namespace extensions {

ShellWebViewGuestDelegate::ShellWebViewGuestDelegate() = default;
ShellWebViewGuestDelegate::~ShellWebViewGuestDelegate() = default;

bool ShellWebViewGuestDelegate::HandleContextMenu(
    content::RenderFrameHost& render_frame_host,
    const content::ContextMenuParams& params) {
  // Eat the context menu request, as AppShell doesn't show context menus.
  return true;
}

void ShellWebViewGuestDelegate::OnShowContextMenu(int request_id) {}

bool ShellWebViewGuestDelegate::NavigateToURLShouldBlock(const GURL& url) {
  return false;
}

std::optional<blink::UserAgentOverride>
ShellWebViewGuestDelegate::GetDefaultUserAgentOverride() {
  return std::nullopt;
}

void ShellWebViewGuestDelegate::SetClientHintsEnabled(bool enable) {}

}  // namespace extensions