chromium/chrome/test/base/test_browser_window.cc

// Copyright 2012 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/test/base/test_browser_window.h"

#include <utility>

#include "base/feature_list.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/find_bar/find_bar.h"
#include "components/sharing_message/sharing_dialog_data.h"
#include "components/user_education/common/feature_promo_controller.h"
#include "components/user_education/common/feature_promo_handle.h"
#include "components/user_education/common/new_badge_controller.h"
#include "content/public/browser/keyboard_event_processing_result.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/color/color_provider_key.h"
#include "ui/color/color_provider_manager.h"
#include "ui/gfx/geometry/rect.h"

// Helpers --------------------------------------------------------------------

std::unique_ptr<Browser> CreateBrowserWithTestWindowForParams(
    Browser::CreateParams params) {}

// TestBrowserWindow::TestLocationBar -----------------------------------------

OmniboxView* TestBrowserWindow::TestLocationBar::GetOmniboxView() {}

LocationBarTesting*
    TestBrowserWindow::TestLocationBar::GetLocationBarForTesting() {}

LocationBarModel* TestBrowserWindow::TestLocationBar::GetLocationBarModel() {}

content::WebContents* TestBrowserWindow::TestLocationBar::GetWebContents() {}

// TestBrowserWindow ----------------------------------------------------------

TestBrowserWindow::TestBrowserWindow() = default;

TestBrowserWindow::~TestBrowserWindow() = default;

void TestBrowserWindow::Close() {}

bool TestBrowserWindow::IsActive() const {}

ui::ZOrderLevel TestBrowserWindow::GetZOrderLevel() const {}

gfx::NativeWindow TestBrowserWindow::GetNativeWindow() const {}

bool TestBrowserWindow::IsOnCurrentWorkspace() const {}

void TestBrowserWindow::SetTopControlsShownRatio(
    content::WebContents* web_contents,
    float ratio) {}

bool TestBrowserWindow::DoBrowserControlsShrinkRendererSize(
    const content::WebContents* contents) const {}

ui::NativeTheme* TestBrowserWindow::GetNativeTheme() {}

const ui::ThemeProvider* TestBrowserWindow::GetThemeProvider() const {}

const ui::ColorProvider* TestBrowserWindow::GetColorProvider() const {}

ui::ElementContext TestBrowserWindow::GetElementContext() {}

int TestBrowserWindow::GetTopControlsHeight() const {}

void TestBrowserWindow::SetTopControlsGestureScrollInProgress(
    bool in_progress) {}

StatusBubble* TestBrowserWindow::GetStatusBubble() {}

gfx::Rect TestBrowserWindow::GetRestoredBounds() const {}

ui::WindowShowState TestBrowserWindow::GetRestoredState() const {}

gfx::Rect TestBrowserWindow::GetBounds() const {}

gfx::Size TestBrowserWindow::GetContentsSize() const {}

void TestBrowserWindow::SetContentsSize(const gfx::Size& size) {}

bool TestBrowserWindow::IsMaximized() const {}

bool TestBrowserWindow::IsMinimized() const {}

bool TestBrowserWindow::ShouldHideUIForFullscreen() const {}

bool TestBrowserWindow::GetCanResize() {}

ui::WindowShowState TestBrowserWindow::GetWindowShowState() const {}

bool TestBrowserWindow::IsFullscreen() const {}

bool TestBrowserWindow::IsFullscreenBubbleVisible() const {}

bool TestBrowserWindow::IsForceFullscreen() const {}

bool TestBrowserWindow::UpdateToolbarSecurityState() {}

bool TestBrowserWindow::IsVisible() const {}

LocationBar* TestBrowserWindow::GetLocationBar() const {}

autofill::AutofillBubbleHandler* TestBrowserWindow::GetAutofillBubbleHandler() {}

ExtensionsContainer* TestBrowserWindow::GetExtensionsContainer() {}

content::KeyboardEventProcessingResult
TestBrowserWindow::PreHandleKeyboardEvent(
    const input::NativeWebKeyboardEvent& event) {}

bool TestBrowserWindow::HandleKeyboardEvent(
    const input::NativeWebKeyboardEvent& event) {}

bool TestBrowserWindow::IsBookmarkBarVisible() const {}

bool TestBrowserWindow::IsBookmarkBarAnimating() const {}

bool TestBrowserWindow::IsTabStripEditable() const {}

void TestBrowserWindow::SetIsTabStripEditable(bool is_editable) {}

bool TestBrowserWindow::IsToolbarVisible() const {}

bool TestBrowserWindow::IsToolbarShowing() const {}

bool TestBrowserWindow::IsLocationBarVisible() const {}

bool TestBrowserWindow::IsBorderlessModeEnabled() const {}

views::WebView* TestBrowserWindow::GetContentsWebView() {}

BrowserView* TestBrowserWindow::AsBrowserView() {}

ShowTranslateBubbleResult TestBrowserWindow::ShowTranslateBubble(
    content::WebContents* contents,
    translate::TranslateStep step,
    const std::string& source_language,
    const std::string& target_language,
    translate::TranslateErrors error_type,
    bool is_user_gesture) {}

void TestBrowserWindow::StartPartialTranslate(
    const std::string& source_language,
    const std::string& target_language,
    const std::u16string& text_selection) {}

qrcode_generator::QRCodeGeneratorBubbleView*
TestBrowserWindow::ShowQRCodeGeneratorBubble(content::WebContents* contents,
                                             const GURL& url,
                                             bool show_back_button) {}

SharingDialog* TestBrowserWindow::ShowSharingDialog(
    content::WebContents* web_contents,
    SharingDialogData data) {}

#if !BUILDFLAG(IS_ANDROID)
sharing_hub::ScreenshotCapturedBubble*
TestBrowserWindow::ShowScreenshotCapturedBubble(content::WebContents* contents,
                                                const gfx::Image& image) {}
#endif

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
void TestBrowserWindow::VerifyUserEligibilityIOSPasswordPromoBubble() {}
#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)

send_tab_to_self::SendTabToSelfBubbleView*
TestBrowserWindow::ShowSendTabToSelfDevicePickerBubble(
    content::WebContents* contents) {}

send_tab_to_self::SendTabToSelfBubbleView*
TestBrowserWindow::ShowSendTabToSelfPromoBubble(content::WebContents* contents,
                                                bool show_signin_button) {}

#if BUILDFLAG(IS_CHROMEOS)
views::Button* TestBrowserWindow::GetSharingHubIconButton() {
  return nullptr;
}
void TestBrowserWindow::ToggleMultitaskMenu() const {
  return;
}
#else
sharing_hub::SharingHubBubbleView* TestBrowserWindow::ShowSharingHubBubble(
    share::ShareAttempt attempt) {}
#endif  // BUILDFLAG(IS_CHROMEOS)

bool TestBrowserWindow::IsDownloadShelfVisible() const {}

DownloadShelf* TestBrowserWindow::GetDownloadShelf() {}
views::View* TestBrowserWindow::GetTopContainer() {}

DownloadBubbleUIController* TestBrowserWindow::GetDownloadBubbleUIController() {}

std::unique_ptr<FindBar> TestBrowserWindow::CreateFindBar() {}

web_modal::WebContentsModalDialogHost*
    TestBrowserWindow::GetWebContentsModalDialogHost() {}

ExclusiveAccessContext* TestBrowserWindow::GetExclusiveAccessContext() {}

std::string TestBrowserWindow::GetWorkspace() const {}

bool TestBrowserWindow::IsVisibleOnAllWorkspaces() const {}

std::unique_ptr<content::EyeDropper> TestBrowserWindow::OpenEyeDropper(
    content::RenderFrameHost* frame,
    content::EyeDropperListener* listener) {}

void TestBrowserWindow::SetNativeWindow(gfx::NativeWindow window) {}

void TestBrowserWindow::SetCloseCallback(base::OnceClosure close_callback) {}

user_education::FeaturePromoController*
TestBrowserWindow::GetFeaturePromoController() {}

bool TestBrowserWindow::IsFeaturePromoActive(
    const base::Feature& iph_feature) const {}

user_education::FeaturePromoResult TestBrowserWindow::CanShowFeaturePromo(
    const base::Feature& iph_feature) const {}

user_education::FeaturePromoResult TestBrowserWindow::MaybeShowFeaturePromo(
    user_education::FeaturePromoParams params) {}

bool TestBrowserWindow::MaybeShowStartupFeaturePromo(
    user_education::FeaturePromoParams params) {}

bool TestBrowserWindow::CloseFeaturePromo(
    const base::Feature& iph_feature,
    user_education::EndFeaturePromoReason close_reason) {}

user_education::FeaturePromoHandle
TestBrowserWindow::CloseFeaturePromoAndContinue(
    const base::Feature& iph_feature) {}

void TestBrowserWindow::NotifyFeatureEngagementEvent(const char* event_name) {}

void TestBrowserWindow::NotifyPromoFeatureUsed(const base::Feature& feature) {}

user_education::DisplayNewBadge TestBrowserWindow::MaybeShowNewBadgeFor(
    const base::Feature& new_badge_feature) {}

user_education::FeaturePromoController*
TestBrowserWindow::SetFeaturePromoController(
    std::unique_ptr<user_education::FeaturePromoController>
        feature_promo_controller) {}

// TestBrowserWindowOwner -----------------------------------------------------

TestBrowserWindowOwner::TestBrowserWindowOwner(
    std::unique_ptr<TestBrowserWindow> window)
    :{}

TestBrowserWindowOwner::~TestBrowserWindowOwner() {}

void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) {}