2015-01-30 19:07:13 +01:00
|
|
|
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
2016-11-18 00:52:42 +01:00
|
|
|
#include "tests/cefclient/browser/root_window.h"
|
2015-01-30 19:07:13 +01:00
|
|
|
|
2021-06-19 21:54:45 +02:00
|
|
|
#include "include/base/cef_callback_helpers.h"
|
2016-11-18 00:52:42 +01:00
|
|
|
#include "tests/cefclient/browser/main_context.h"
|
|
|
|
#include "tests/cefclient/browser/root_window_manager.h"
|
2023-11-29 02:33:44 +01:00
|
|
|
#include "tests/shared/common/client_switches.h"
|
2015-01-30 19:07:13 +01:00
|
|
|
|
|
|
|
namespace client {
|
|
|
|
|
2023-11-29 02:33:44 +01:00
|
|
|
RootWindowConfig::RootWindowConfig(CefRefPtr<CefCommandLine> cmd)
|
|
|
|
: command_line(cmd ? cmd : MainContext::Get()->GetCommandLine()),
|
2024-04-17 18:01:26 +02:00
|
|
|
use_views(MainContext::Get()->UseViewsGlobal()),
|
|
|
|
use_alloy_style(MainContext::Get()->UseAlloyStyleGlobal()),
|
2023-11-29 02:33:44 +01:00
|
|
|
with_controls(!command_line->HasSwitch(switches::kHideControls)),
|
|
|
|
url(MainContext::Get()->GetMainURL(command_line)) {}
|
2017-08-04 00:55:19 +02:00
|
|
|
|
2024-04-17 18:01:26 +02:00
|
|
|
RootWindow::RootWindow(bool use_alloy_style)
|
|
|
|
: use_alloy_style_(use_alloy_style) {}
|
2017-08-04 00:55:19 +02:00
|
|
|
|
2024-01-20 03:22:56 +01:00
|
|
|
RootWindow::~RootWindow() = default;
|
2017-08-04 00:55:19 +02:00
|
|
|
|
2015-01-30 19:07:13 +01:00
|
|
|
// static
|
2015-01-30 19:55:55 +01:00
|
|
|
scoped_refptr<RootWindow> RootWindow::GetForBrowser(int browser_id) {
|
2015-01-30 19:07:13 +01:00
|
|
|
return MainContext::Get()->GetRootWindowManager()->GetWindowForBrowser(
|
|
|
|
browser_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace client
|