diff options
Diffstat (limited to 'src/core/chromium_overrides.cpp')
-rw-r--r-- | src/core/chromium_overrides.cpp | 73 |
1 files changed, 14 insertions, 59 deletions
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp index 7a5ea3737..3a183d0d8 100644 --- a/src/core/chromium_overrides.cpp +++ b/src/core/chromium_overrides.cpp @@ -1,74 +1,24 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "type_conversion.h" #include "ozone/gl_context_qt.h" #include "qtwebenginecoreglobal_p.h" #include "web_contents_view_qt.h" #include "web_engine_library_info.h" + #include "base/values.h" -#include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/common/font_list.h" +#include "extensions/buildflags/buildflags.h" +#include "extensions/common/constants.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data_provider_factory.h" -#include "ui/events/devices/device_data_manager.h" -#include "ui/events/platform/platform_event_source.h" -#include "ppapi/buildflags/buildflags.h" #include <QGuiApplication> -#include <QScreen> -#include <QWindow> #include <QFontDatabase> -#include <QStringList> #include <QLibraryInfo> -#if defined(USE_AURA) && !defined(USE_OZONE) -#include "ui/base/dragdrop/os_exchange_data.h" -#include "ui/gfx/render_text.h" -#include "ui/gfx/platform_font.h" -#endif - -#if defined(USE_OPENSSL_CERTS) -#include "net/ssl/openssl_client_key_store.h" -#endif - #if !QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions) #include "chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h" #endif @@ -79,7 +29,6 @@ void *GetQtXDisplay() } namespace content { -class WebContentsImpl; class WebContentsView; class WebContentsViewDelegate; class RenderViewHostDelegateView; @@ -93,7 +42,7 @@ WebContentsView* CreateWebContentsView(WebContentsImpl *web_contents, return rv; } -#if defined(OS_MAC) +#if defined(Q_OS_DARWIN) #if defined(QT_MAC_FRAMEWORK_BUILD) base::FilePath getSandboxPath() { @@ -119,8 +68,8 @@ std::unique_ptr<base::ListValue> GetFontList_SlowBlocking() for (auto family : QFontDatabase::families()){ std::unique_ptr<base::ListValue> font_item(new base::ListValue()); - font_item->AppendString(family.toStdString()); - font_item->AppendString(family.toStdString()); // localized name. + font_item->Append(family.toStdString()); + font_item->Append(family.toStdString()); // localized name. // TODO(yusukes): Support localized family names. font_list->Append(std::move(font_item)); } @@ -149,6 +98,12 @@ std::unique_ptr<ui::OSExchangeDataProvider> ui::OSExchangeDataProviderFactory::C return nullptr; } +#if !BUILDFLAG(ENABLE_EXTENSIONS) +namespace extensions { + const char kExtensionScheme[] = "chrome-extension"; +} +#endif + #if !QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions) namespace extensions { ExtensionFunction::ResponseAction WebrtcLoggingPrivateSetMetaDataFunction::Run() |