summaryrefslogtreecommitdiffstats
path: root/src/core/renderer_host
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-02-23 14:43:14 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-04-15 18:11:44 +0200
commit027e7e574e7a4488d47cd4133e98d518210b1e56 (patch)
treec45f05457509b7d99c39a3889119c04c4aee39e3 /src/core/renderer_host
parent2dce0008ce53d27d281ad2dc00eb32d25ae5fc84 (diff)
Adaptations for Chromium 88
Change-Id: Ie66e95dbb9fbcafe961bb98d5c277f8c32d66b96 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/renderer_host')
-rw-r--r--src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp127
-rw-r--r--src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h85
-rw-r--r--src/core/renderer_host/pepper/pepper_host_factory_qt.cpp15
3 files changed, 0 insertions, 227 deletions
diff --git a/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp
deleted file mode 100644
index 8fa277e78..000000000
--- a/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-// This is based on chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc:
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE.Chromium file.
-
-#include "pepper_flash_browser_host_qt.h"
-
-#include "base/time/time.h"
-#include "content/public/browser/browser_ppapi_host.h"
-#include "ipc/ipc_message_macros.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/host/dispatch_host_message.h"
-#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/proxy/resource_message_params.h"
-#include "ppapi/shared_impl/time_conversion.h"
-#include "qtwebenginecoreglobal_p.h"
-
-#if defined(OS_WIN)
-#include <windows.h>
-#elif defined(OS_MAC)
-#include <CoreServices/CoreServices.h>
-#endif
-
-using content::BrowserPpapiHost;
-
-namespace QtWebEngineCore {
-
-PepperFlashBrowserHostQt::PepperFlashBrowserHostQt(BrowserPpapiHost* host,
- PP_Instance instance,
- PP_Resource resource)
- : ResourceHost(host->GetPpapiHost(), instance, resource),
- weak_factory_(this)
-{
-}
-
-PepperFlashBrowserHostQt::~PepperFlashBrowserHostQt() {}
-
-int32_t PepperFlashBrowserHostQt::OnResourceMessageReceived(
- const IPC::Message& msg,
- ppapi::host::HostMessageContext* context)
-{
- PPAPI_BEGIN_MESSAGE_MAP(PepperFlashBrowserHostQt, msg)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_Flash_UpdateActivity,
- OnUpdateActivity)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_Flash_GetLocalTimeZoneOffset,
- OnGetLocalTimeZoneOffset)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_Flash_GetLocalDataRestrictions,
- OnGetLocalDataRestrictions)
- PPAPI_END_MESSAGE_MAP()
- return PP_ERROR_FAILED;
-}
-
-int32_t PepperFlashBrowserHostQt::OnUpdateActivity(ppapi::host::HostMessageContext* host_context)
-{
-#if defined(OS_WIN)
- // Reading then writing back the same value to the screensaver timeout system
- // setting resets the countdown which prevents the screensaver from turning
- // on "for a while". As long as the plugin pings us with this message faster
- // than the screensaver timeout, it won't go on.
- int value = 0;
- if (SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0, &value, 0))
- SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, value, NULL, 0);
-#elif defined(OS_MAC)
- UpdateSystemActivity(OverallAct);
-#endif
- return PP_OK;
-}
-
-int32_t PepperFlashBrowserHostQt::OnGetLocalTimeZoneOffset(
- ppapi::host::HostMessageContext* host_context,
- const base::Time& t)
-{
- // The reason for this processing being in the browser process is that on
- // Linux, the localtime calls require filesystem access prohibited by the
- // sandbox.
- host_context->reply_msg = PpapiPluginMsg_Flash_GetLocalTimeZoneOffsetReply(
- ppapi::PPGetLocalTimeZoneOffset(t));
- return PP_OK;
-}
-
-int32_t PepperFlashBrowserHostQt::OnGetLocalDataRestrictions(
- ppapi::host::HostMessageContext* context)
-{
- QT_NOT_YET_IMPLEMENTED
- return PP_OK;
-}
-
-} // namespace QtWebEngineCore
diff --git a/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h
deleted file mode 100644
index d6d2c8656..000000000
--- a/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-#ifndef PEPPER_FLASH_BROWSER_HOST_QT_H
-#define PEPPER_FLASH_BROWSER_HOST_QT_H
-
-#include "base/memory/weak_ptr.h"
-#include "ppapi/host/host_message_context.h"
-#include "ppapi/host/resource_host.h"
-
-namespace base {
-class Time;
-}
-
-namespace content {
-class BrowserPpapiHost;
-}
-
-class GURL;
-
-namespace QtWebEngineCore {
-
-class PepperFlashBrowserHostQt : public ppapi::host::ResourceHost {
-public:
- PepperFlashBrowserHostQt(content::BrowserPpapiHost* host,
- PP_Instance instance,
- PP_Resource resource);
- ~PepperFlashBrowserHostQt() override;
-
- // ppapi::host::ResourceHost override.
- int32_t OnResourceMessageReceived(
- const IPC::Message& msg,
- ppapi::host::HostMessageContext* context) override;
-
-private:
- int32_t OnUpdateActivity(ppapi::host::HostMessageContext* host_context);
- int32_t OnGetLocalTimeZoneOffset(
- ppapi::host::HostMessageContext* host_context,
- const base::Time& t);
- int32_t OnGetLocalDataRestrictions(ppapi::host::HostMessageContext* context);
-
- base::WeakPtrFactory<PepperFlashBrowserHostQt> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHostQt);
-};
-
-} // namespace QtWebEngineCore
-
-#endif // PEPPER_FLASH_BROWSER_HOST_QT_H
diff --git a/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp b/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp
index 00ab4963b..6686f8b12 100644
--- a/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp
+++ b/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp
@@ -46,7 +46,6 @@
#include "base/memory/ptr_util.h"
#include "build/build_config.h"
-#include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "ppapi/host/message_filter_host.h"
#include "ppapi/host/ppapi_host.h"
@@ -54,7 +53,6 @@
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
-#include "pepper_flash_browser_host_qt.h"
#include "pepper_isolated_file_system_message_filter.h"
using ppapi::host::MessageFilterHost;
@@ -80,19 +78,6 @@ std::unique_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHo
if (!host_->IsValidInstance(instance))
return nullptr;
- // Flash interfaces.
- if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)) {
- switch (message.type()) {
- case PpapiHostMsg_Flash_Create::ID:
- return base::WrapUnique(new PepperFlashBrowserHostQt(host_, instance, resource));
- case PpapiHostMsg_FlashClipboard_Create::ID: {
- scoped_refptr<ResourceMessageFilter> clipboard_filter(new PepperFlashClipboardMessageFilter);
- return base::WrapUnique(new MessageFilterHost(
- host_->GetPpapiHost(), instance, resource, clipboard_filter));
- }
- }
- }
-
// Permissions for the following interfaces will be checked at the
// time of the corresponding instance's methods calls (because
// permission check can be performed only on the UI