chromium/chrome/browser/ui/webui/feedback/feedback_handler.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.

#include "chrome/browser/ui/webui/feedback/feedback_handler.h"

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

#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/strcat.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/webui/feedback/feedback_dialog.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/api/feedback_private.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/base/ui_base_types.h"
#include "ui/views/widget/widget.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
#include "url/gurl.h"

namespace {

void ShowChildPage(Profile* profile,
                   const base::WeakPtr<FeedbackDialog>& dialog,
                   const GURL& url,
                   const std::u16string& title,
                   const std::string& args = "",
                   int dialog_width = 640,
                   int dialog_height = 400,
                   bool can_resize = true,
                   bool can_minimize = true) {}

GURL ChildPageURL(const std::string& child_page) {}
}  // namespace

FeedbackHandler::FeedbackHandler(base::WeakPtr<FeedbackDialog> dialog)
    :{}

FeedbackHandler::~FeedbackHandler() = default;

void FeedbackHandler::RegisterMessages() {}

void FeedbackHandler::HandleShowDialog(const base::Value::List& args) {}

#if BUILDFLAG(IS_CHROMEOS)
void FeedbackHandler::HandleShowAssistantLogsInfo(
    const base::Value::List& args) {
  ShowChildPage(Profile::FromWebUI(web_ui()), dialog_,
                ChildPageURL("html/assistant_logs_info.html"), std::u16string(),
                std::string(),
                /*dialog_width=*/400, /*dialog_height=*/120,
                /*can_resize=*/false, /*can_minimize=*/false);
}
#endif  // BUILDFLAG(IS_CHROMEOS)

void FeedbackHandler::HandleShowAutofillMetadataInfo(
    const base::Value::List& args) {}

void FeedbackHandler::HandleShowSystemInfo(const base::Value::List& args) {}

void FeedbackHandler::HandleShowMetrics(const base::Value::List& args) {}