chromium/chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.h"

#include <memory>
#include <utility>

#include "chrome/browser/browser_features.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.h"
#include "chrome/browser/ui/webui/favicon_source.h"
#include "chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_handler.h"
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/browser/ui/webui/webui_util.h"
#include "chrome/browser/ui/webui/webui_util_desktop.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/new_tab_page_third_party_resources.h"
#include "chrome/grit/new_tab_page_third_party_resources_map.h"
#include "chrome/grit/theme_resources.h"
#include "components/favicon_base/favicon_url_parser.h"
#include "components/prefs/pref_service.h"
#include "components/search/ntp_features.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui_data_source.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/color_utils.h"
#include "ui/resources/grit/webui_resources.h"
#include "url/url_util.h"

BrowserContext;
WebContents;

namespace {
void CreateAndAddNewTabPageThirdPartyUiHtmlSource(Profile* profile,
                                                  WebContents* web_contents) {}
}  // namespace

NewTabPageThirdPartyUI::NewTabPageThirdPartyUI(content::WebUI* web_ui)
    :{}

WEB_UI_CONTROLLER_TYPE_IMPL(NewTabPageThirdPartyUI)

NewTabPageThirdPartyUI::~NewTabPageThirdPartyUI() = default;

// static
bool NewTabPageThirdPartyUI::IsNewTabPageOrigin(const GURL& url) {}

void NewTabPageThirdPartyUI::BindInterface(
    mojo::PendingReceiver<new_tab_page_third_party::mojom::PageHandlerFactory>
        pending_receiver) {}

void NewTabPageThirdPartyUI::BindInterface(
    mojo::PendingReceiver<most_visited::mojom::MostVisitedPageHandlerFactory>
        pending_receiver) {}

void NewTabPageThirdPartyUI::CreatePageHandler(
    mojo::PendingRemote<new_tab_page_third_party::mojom::Page> pending_page,
    mojo::PendingReceiver<new_tab_page_third_party::mojom::PageHandler>
        pending_page_handler) {}

void NewTabPageThirdPartyUI::CreatePageHandler(
    mojo::PendingRemote<most_visited::mojom::MostVisitedPage> pending_page,
    mojo::PendingReceiver<most_visited::mojom::MostVisitedPageHandler>
        pending_page_handler) {}