summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-06-15 15:10:01 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-07-09 19:22:21 +0000
commit490fdc9bc547b8c10f7e0daf5c898b4548d7309d (patch)
treed95084f8082b4d376c936156b3c4d50de90d7f64
parentd599aea151a5c7753e7eb1fc1a2c2b5953ac580b (diff)
Rename BrowserAdapterClient to ProfileAdapterClient
Change-Id: I1f8c0d2e59c2565b24c8c636553f1b70bcd31774 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r--src/core/core_chromium.pri4
-rw-r--r--src/core/download_manager_delegate_qt.cpp42
-rw-r--r--src/core/profile_adapter.cpp4
-rw-r--r--src/core/profile_adapter.h10
-rw-r--r--src/core/profile_adapter_client.cpp (renamed from src/core/browser_context_adapter_client.cpp)74
-rw-r--r--src/core/profile_adapter_client.h (renamed from src/core/browser_context_adapter_client.h)10
-rw-r--r--src/core/web_contents_adapter.cpp2
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp70
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p_p.h4
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp10
-rw-r--r--src/webengine/api/qquickwebengineprofile_p.h4
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp72
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem_p.h2
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp10
-rw-r--r--src/webenginewidgets/api/qwebengineprofile_p.h4
15 files changed, 161 insertions, 161 deletions
diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri
index b349b0f4f..7ed489f14 100644
--- a/src/core/core_chromium.pri
+++ b/src/core/core_chromium.pri
@@ -41,7 +41,6 @@ SOURCES = \
authentication_dialog_controller.cpp \
browser_accessibility_manager_qt.cpp \
browser_accessibility_qt.cpp \
- browser_context_adapter_client.cpp \
browsing_data_remover_delegate_qt.cpp \
browser_message_filter_qt.cpp \
certificate_error_controller.cpp \
@@ -93,6 +92,7 @@ SOURCES = \
permission_manager_qt.cpp \
process_main.cpp \
profile_adapter.cpp \
+ profile_adapter_client.cpp \
profile_qt.cpp \
profile_io_data_qt.cpp \
quota_permission_context_qt.cpp \
@@ -130,7 +130,6 @@ HEADERS = \
build_config_qt.h \
browser_accessibility_manager_qt.h \
browser_accessibility_qt.h \
- browser_context_adapter_client.h \
browsing_data_remover_delegate_qt.h \
browser_message_filter_qt.h \
certificate_error_controller_p.h \
@@ -183,6 +182,7 @@ HEADERS = \
permission_manager_qt.h \
process_main.h \
profile_adapter.h \
+ profile_adapter_client.h \
profile_qt.h \
profile_io_data_qt.h \
proxy_config_service_qt.h \
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp
index 720f88d1f..813657365 100644
--- a/src/core/download_manager_delegate_qt.cpp
+++ b/src/core/download_manager_delegate_qt.cpp
@@ -52,7 +52,7 @@
#include <QMimeDatabase>
#include <QStandardPaths>
-#include "browser_context_adapter_client.h"
+#include "profile_adapter_client.h"
#include "profile_adapter.h"
#include "profile_qt.h"
#include "qtwebenginecoreglobal.h"
@@ -125,14 +125,14 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem*
int downloadType = 0;
if (m_nextDownloadIsUserRequested) {
- downloadType = BrowserContextAdapterClient::UserRequested;
+ downloadType = ProfileAdapterClient::UserRequested;
m_nextDownloadIsUserRequested = false;
} else {
bool isAttachment = net::HttpContentDisposition(item->GetContentDisposition(), std::string()).is_attachment();
if (isAttachment)
- downloadType = BrowserContextAdapterClient::Attachment;
+ downloadType = ProfileAdapterClient::Attachment;
else
- downloadType = BrowserContextAdapterClient::DownloadAttribute;
+ downloadType = ProfileAdapterClient::DownloadAttribute;
}
if (suggestedFilename.isEmpty())
@@ -166,9 +166,9 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem*
}
item->AddObserver(this);
- QList<BrowserContextAdapterClient*> clients = m_profileAdapter->clients();
+ QList<ProfileAdapterClient*> clients = m_profileAdapter->clients();
if (!clients.isEmpty()) {
- BrowserContextAdapterClient::DownloadItemInfo info = {
+ ProfileAdapterClient::DownloadItemInfo info = {
item->GetId(),
toQt(item->GetURL()),
item->GetState(),
@@ -176,7 +176,7 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem*
item->GetReceivedBytes(),
mimeTypeString,
suggestedFilePath,
- BrowserContextAdapterClient::UnknownSavePageFormat,
+ ProfileAdapterClient::UnknownSavePageFormat,
false /* accepted */,
false /* paused */,
false /* done */,
@@ -184,7 +184,7 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem*
item->GetLastReason()
};
- for (BrowserContextAdapterClient *client : qAsConst(clients)) {
+ for (ProfileAdapterClient *client : qAsConst(clients)) {
client->downloadRequested(info);
if (info.accepted)
break;
@@ -234,7 +234,7 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
Q_UNUSED(default_extension);
Q_UNUSED(can_save_as_complete);
- QList<BrowserContextAdapterClient*> clients = m_profileAdapter->clients();
+ QList<ProfileAdapterClient*> clients = m_profileAdapter->clients();
if (clients.isEmpty())
return;
@@ -255,15 +255,15 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
suggestedFilePath = downloadDir.absoluteFilePath(suggestedFilePath);
}
- BrowserContextAdapterClient::SavePageFormat suggestedSaveFormat
- = static_cast<BrowserContextAdapterClient::SavePageFormat>(spi.requestedFormat);
- if (suggestedSaveFormat == BrowserContextAdapterClient::UnknownSavePageFormat)
- suggestedSaveFormat = BrowserContextAdapterClient::MimeHtmlSaveFormat;
+ ProfileAdapterClient::SavePageFormat suggestedSaveFormat
+ = static_cast<ProfileAdapterClient::SavePageFormat>(spi.requestedFormat);
+ if (suggestedSaveFormat == ProfileAdapterClient::UnknownSavePageFormat)
+ suggestedSaveFormat = ProfileAdapterClient::MimeHtmlSaveFormat;
// Clear the delegate's SavePageInfo. It's only valid for the page currently being saved.
contentsDelegate->setSavePageInfo(SavePageInfo());
- BrowserContextAdapterClient::DownloadItemInfo info = {
+ ProfileAdapterClient::DownloadItemInfo info = {
m_currentId + 1,
toQt(web_contents->GetURL()),
download::DownloadItem::IN_PROGRESS,
@@ -275,11 +275,11 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
acceptedByDefault,
false, /* paused */
false, /* done */
- BrowserContextAdapterClient::SavePage,
- BrowserContextAdapterClient::NoReason
+ ProfileAdapterClient::SavePage,
+ ProfileAdapterClient::NoReason
};
- for (BrowserContextAdapterClient *client : qAsConst(clients)) {
+ for (ProfileAdapterClient *client : qAsConst(clients)) {
client->downloadRequested(info);
if (info.accepted)
break;
@@ -321,9 +321,9 @@ void DownloadManagerDelegateQt::savePackageDownloadCreated(download::DownloadIte
void DownloadManagerDelegateQt::OnDownloadUpdated(download::DownloadItem *download)
{
- QList<BrowserContextAdapterClient*> clients = m_profileAdapter->clients();
+ QList<ProfileAdapterClient*> clients = m_profileAdapter->clients();
if (!clients.isEmpty()) {
- BrowserContextAdapterClient::DownloadItemInfo info = {
+ ProfileAdapterClient::DownloadItemInfo info = {
download->GetId(),
toQt(download->GetURL()),
download->GetState(),
@@ -331,7 +331,7 @@ void DownloadManagerDelegateQt::OnDownloadUpdated(download::DownloadItem *downlo
download->GetReceivedBytes(),
toQt(download->GetMimeType()),
QString(),
- BrowserContextAdapterClient::UnknownSavePageFormat,
+ ProfileAdapterClient::UnknownSavePageFormat,
true /* accepted */,
download->IsPaused(),
download->IsDone(),
@@ -339,7 +339,7 @@ void DownloadManagerDelegateQt::OnDownloadUpdated(download::DownloadItem *downlo
download->GetLastReason()
};
- for (BrowserContextAdapterClient *client : qAsConst(clients)) {
+ for (ProfileAdapterClient *client : qAsConst(clients)) {
client->downloadUpdated(info);
}
}
diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp
index aa539f857..2ae568b64 100644
--- a/src/core/profile_adapter.cpp
+++ b/src/core/profile_adapter.cpp
@@ -163,12 +163,12 @@ void ProfileAdapter::setRequestInterceptor(QWebEngineUrlRequestInterceptor *inte
m_profile->m_profileIOData->updateRequestInterceptor();
}
-void ProfileAdapter::addClient(BrowserContextAdapterClient *adapterClient)
+void ProfileAdapter::addClient(ProfileAdapterClient *adapterClient)
{
m_clients.append(adapterClient);
}
-void ProfileAdapter::removeClient(BrowserContextAdapterClient *adapterClient)
+void ProfileAdapter::removeClient(ProfileAdapterClient *adapterClient)
{
m_clients.removeOne(adapterClient);
}
diff --git a/src/core/profile_adapter.h b/src/core/profile_adapter.h
index 64d73bd34..1e2a700d6 100644
--- a/src/core/profile_adapter.h
+++ b/src/core/profile_adapter.h
@@ -68,7 +68,7 @@ QT_FORWARD_DECLARE_CLASS(QObject)
namespace QtWebEngineCore {
-class BrowserContextAdapterClient;
+class ProfileAdapterClient;
class DownloadManagerDelegateQt;
class ProfileQt;
class UserResourceControllerHost;
@@ -91,9 +91,9 @@ public:
QWebEngineUrlRequestInterceptor* requestInterceptor();
void setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor);
- QList<BrowserContextAdapterClient*> clients() { return m_clients; }
- void addClient(BrowserContextAdapterClient *adapterClient);
- void removeClient(BrowserContextAdapterClient *adapterClient);
+ QList<ProfileAdapterClient*> clients() { return m_clients; }
+ void addClient(ProfileAdapterClient *adapterClient);
+ void removeClient(ProfileAdapterClient *adapterClient);
void cancelDownload(quint32 downloadId);
void pauseDownload(quint32 downloadId);
@@ -206,7 +206,7 @@ private:
PersistentCookiesPolicy m_persistentCookiesPolicy;
VisitedLinksPolicy m_visitedLinksPolicy;
QHash<QByteArray, QWebEngineUrlSchemeHandler *> m_customUrlSchemeHandlers;
- QList<BrowserContextAdapterClient*> m_clients;
+ QList<ProfileAdapterClient*> m_clients;
int m_httpCacheMaxSize;
Q_DISABLE_COPY(ProfileAdapter)
diff --git a/src/core/browser_context_adapter_client.cpp b/src/core/profile_adapter_client.cpp
index d907c8d26..9aa084da9 100644
--- a/src/core/browser_context_adapter_client.cpp
+++ b/src/core/profile_adapter_client.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "browser_context_adapter_client.h"
+#include "profile_adapter_client.h"
#include "components/download/public/common/download_item.h"
#include "content/public/browser/save_page_type.h"
@@ -46,45 +46,45 @@
namespace QtWebEngineCore {
-ASSERT_ENUMS_MATCH(download::DownloadItem::IN_PROGRESS, BrowserContextAdapterClient::DownloadInProgress)
-ASSERT_ENUMS_MATCH(download::DownloadItem::COMPLETE, BrowserContextAdapterClient::DownloadCompleted)
-ASSERT_ENUMS_MATCH(download::DownloadItem::CANCELLED, BrowserContextAdapterClient::DownloadCancelled)
-ASSERT_ENUMS_MATCH(download::DownloadItem::INTERRUPTED, BrowserContextAdapterClient::DownloadInterrupted)
+ASSERT_ENUMS_MATCH(download::DownloadItem::IN_PROGRESS, ProfileAdapterClient::DownloadInProgress)
+ASSERT_ENUMS_MATCH(download::DownloadItem::COMPLETE, ProfileAdapterClient::DownloadCompleted)
+ASSERT_ENUMS_MATCH(download::DownloadItem::CANCELLED, ProfileAdapterClient::DownloadCancelled)
+ASSERT_ENUMS_MATCH(download::DownloadItem::INTERRUPTED, ProfileAdapterClient::DownloadInterrupted)
-ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_UNKNOWN, BrowserContextAdapterClient::UnknownSavePageFormat)
-ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_AS_ONLY_HTML, BrowserContextAdapterClient::SingleHtmlSaveFormat)
-ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, BrowserContextAdapterClient::CompleteHtmlSaveFormat)
-ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_AS_MHTML, BrowserContextAdapterClient::MimeHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_UNKNOWN, ProfileAdapterClient::UnknownSavePageFormat)
+ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_AS_ONLY_HTML, ProfileAdapterClient::SingleHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, ProfileAdapterClient::CompleteHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(content::SAVE_PAGE_TYPE_AS_MHTML, ProfileAdapterClient::MimeHtmlSaveFormat)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NONE, BrowserContextAdapterClient::NoReason)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, BrowserContextAdapterClient::FileFailed)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, BrowserContextAdapterClient::FileAccessDenied)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, BrowserContextAdapterClient::FileNoSpace)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, BrowserContextAdapterClient::FileNameTooLong)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, BrowserContextAdapterClient::FileTooLarge)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, BrowserContextAdapterClient::FileVirusInfected)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, BrowserContextAdapterClient::FileTransientError)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, BrowserContextAdapterClient::FileBlocked)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED, BrowserContextAdapterClient::FileSecurityCheckFailed)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT, BrowserContextAdapterClient::FileTooShort)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH, BrowserContextAdapterClient::FileHashMismatch)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, BrowserContextAdapterClient::NetworkFailed)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, BrowserContextAdapterClient::NetworkTimeout)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, BrowserContextAdapterClient::NetworkDisconnected)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, BrowserContextAdapterClient::NetworkServerDown)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, BrowserContextAdapterClient::NetworkInvalidRequest)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, BrowserContextAdapterClient::ServerFailed)
-//ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, BrowserContextAdapterClient::ServerNoRange)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, BrowserContextAdapterClient::ServerBadContent)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, BrowserContextAdapterClient::ServerUnauthorized)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM, BrowserContextAdapterClient::ServerCertProblem)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, BrowserContextAdapterClient::ServerForbidden)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE, BrowserContextAdapterClient::ServerUnreachable)
-ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, BrowserContextAdapterClient::UserCanceled)
-//ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, BrowserContextAdapterClient::UserShutdown)
-//ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_CRASH, BrowserContextAdapterClient::Crash)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NONE, ProfileAdapterClient::NoReason)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, ProfileAdapterClient::FileFailed)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, ProfileAdapterClient::FileAccessDenied)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, ProfileAdapterClient::FileNoSpace)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, ProfileAdapterClient::FileNameTooLong)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, ProfileAdapterClient::FileTooLarge)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, ProfileAdapterClient::FileVirusInfected)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, ProfileAdapterClient::FileTransientError)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, ProfileAdapterClient::FileBlocked)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED, ProfileAdapterClient::FileSecurityCheckFailed)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT, ProfileAdapterClient::FileTooShort)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH, ProfileAdapterClient::FileHashMismatch)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, ProfileAdapterClient::NetworkFailed)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, ProfileAdapterClient::NetworkTimeout)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, ProfileAdapterClient::NetworkDisconnected)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, ProfileAdapterClient::NetworkServerDown)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, ProfileAdapterClient::NetworkInvalidRequest)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, ProfileAdapterClient::ServerFailed)
+//ASSERT_ENUMS_MATCH(content::DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, ProfileAdapterClient::ServerNoRange)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, ProfileAdapterClient::ServerBadContent)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, ProfileAdapterClient::ServerUnauthorized)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM, ProfileAdapterClient::ServerCertProblem)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, ProfileAdapterClient::ServerForbidden)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE, ProfileAdapterClient::ServerUnreachable)
+ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, ProfileAdapterClient::UserCanceled)
+//ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, ProfileAdapterClient::UserShutdown)
+//ASSERT_ENUMS_MATCH(download::DOWNLOAD_INTERRUPT_REASON_CRASH, ProfileAdapterClient::Crash)
-QString BrowserContextAdapterClient::downloadInterruptReasonToString(DownloadInterruptReason reason)
+QString ProfileAdapterClient::downloadInterruptReasonToString(DownloadInterruptReason reason)
{
switch (reason) {
default:
diff --git a/src/core/browser_context_adapter_client.h b/src/core/profile_adapter_client.h
index b6351c15b..65b0aed6a 100644
--- a/src/core/browser_context_adapter_client.h
+++ b/src/core/profile_adapter_client.h
@@ -48,8 +48,8 @@
// We mean it.
//
-#ifndef BROWSER_CONTEXT_ADAPTER_CLIENT_H
-#define BROWSER_CONTEXT_ADAPTER_CLIENT_H
+#ifndef PROFILE_ADAPTER_CLIENT_H
+#define PROFILE_ADAPTER_CLIENT_H
#include "qtwebenginecoreglobal_p.h"
#include <QString>
@@ -57,7 +57,7 @@
namespace QtWebEngineCore {
-class QWEBENGINECORE_PRIVATE_EXPORT BrowserContextAdapterClient
+class QWEBENGINECORE_PRIVATE_EXPORT ProfileAdapterClient
{
public:
// Keep in sync with content::DownloadItem::DownloadState
@@ -135,7 +135,7 @@ public:
int downloadInterruptReason;
};
- virtual ~BrowserContextAdapterClient() { }
+ virtual ~ProfileAdapterClient() { }
virtual void downloadRequested(DownloadItemInfo &info) = 0;
virtual void downloadUpdated(const DownloadItemInfo &info) = 0;
@@ -144,4 +144,4 @@ public:
} // namespace
-#endif // BROWSER_CONTEXT_ADAPTER_CLIENT_H
+#endif // PROFILE_ADAPTER_CLIENT_H
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 047d3e0c2..fc4dc9b2a 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -44,7 +44,7 @@
#include "web_contents_adapter.h"
#include "browser_accessibility_qt.h"
-#include "browser_context_adapter_client.h"
+#include "profile_adapter_client.h"
#include "profile_adapter.h"
#include "devtools_frontend_qt.h"
#include "download_manager_delegate_qt.h"
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index 8f903564b..f44351f4c 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -43,47 +43,47 @@
#include "profile_adapter.h"
#include "qquickwebengineprofile_p.h"
-using QtWebEngineCore::BrowserContextAdapterClient;
+using QtWebEngineCore::ProfileAdapterClient;
QT_BEGIN_NAMESPACE
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NoReason, QQuickWebEngineDownloadItem::NoReason)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileFailed, QQuickWebEngineDownloadItem::FileFailed)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileAccessDenied, QQuickWebEngineDownloadItem::FileAccessDenied)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileNoSpace, QQuickWebEngineDownloadItem::FileNoSpace)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileNameTooLong, QQuickWebEngineDownloadItem::FileNameTooLong)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileTooLarge, QQuickWebEngineDownloadItem::FileTooLarge)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileVirusInfected, QQuickWebEngineDownloadItem::FileVirusInfected)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileTransientError, QQuickWebEngineDownloadItem::FileTransientError)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileBlocked, QQuickWebEngineDownloadItem::FileBlocked)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileSecurityCheckFailed, QQuickWebEngineDownloadItem::FileSecurityCheckFailed)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileTooShort, QQuickWebEngineDownloadItem::FileTooShort)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileHashMismatch, QQuickWebEngineDownloadItem::FileHashMismatch)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkFailed, QQuickWebEngineDownloadItem::NetworkFailed)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkTimeout, QQuickWebEngineDownloadItem::NetworkTimeout)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkDisconnected, QQuickWebEngineDownloadItem::NetworkDisconnected)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkServerDown, QQuickWebEngineDownloadItem::NetworkServerDown)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkInvalidRequest, QQuickWebEngineDownloadItem::NetworkInvalidRequest)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerFailed, QQuickWebEngineDownloadItem::ServerFailed)
-//ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerNoRange, QQuickWebEngineDownloadItem::ServerNoRange)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerBadContent, QQuickWebEngineDownloadItem::ServerBadContent)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerUnauthorized, QQuickWebEngineDownloadItem::ServerUnauthorized)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerCertProblem, QQuickWebEngineDownloadItem::ServerCertProblem)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerForbidden, QQuickWebEngineDownloadItem::ServerForbidden)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerUnreachable, QQuickWebEngineDownloadItem::ServerUnreachable)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::UserCanceled, QQuickWebEngineDownloadItem::UserCanceled)
-//ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::UserShutdown, QQuickWebEngineDownloadItem::UserShutdown)
-//ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::Crash, QQuickWebEngineDownloadItem::Crash)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NoReason, QQuickWebEngineDownloadItem::NoReason)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileFailed, QQuickWebEngineDownloadItem::FileFailed)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileAccessDenied, QQuickWebEngineDownloadItem::FileAccessDenied)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileNoSpace, QQuickWebEngineDownloadItem::FileNoSpace)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileNameTooLong, QQuickWebEngineDownloadItem::FileNameTooLong)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileTooLarge, QQuickWebEngineDownloadItem::FileTooLarge)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileVirusInfected, QQuickWebEngineDownloadItem::FileVirusInfected)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileTransientError, QQuickWebEngineDownloadItem::FileTransientError)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileBlocked, QQuickWebEngineDownloadItem::FileBlocked)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileSecurityCheckFailed, QQuickWebEngineDownloadItem::FileSecurityCheckFailed)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileTooShort, QQuickWebEngineDownloadItem::FileTooShort)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileHashMismatch, QQuickWebEngineDownloadItem::FileHashMismatch)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkFailed, QQuickWebEngineDownloadItem::NetworkFailed)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkTimeout, QQuickWebEngineDownloadItem::NetworkTimeout)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkDisconnected, QQuickWebEngineDownloadItem::NetworkDisconnected)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkServerDown, QQuickWebEngineDownloadItem::NetworkServerDown)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkInvalidRequest, QQuickWebEngineDownloadItem::NetworkInvalidRequest)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerFailed, QQuickWebEngineDownloadItem::ServerFailed)
+//ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerNoRange, QQuickWebEngineDownloadItem::ServerNoRange)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerBadContent, QQuickWebEngineDownloadItem::ServerBadContent)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerUnauthorized, QQuickWebEngineDownloadItem::ServerUnauthorized)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerCertProblem, QQuickWebEngineDownloadItem::ServerCertProblem)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerForbidden, QQuickWebEngineDownloadItem::ServerForbidden)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerUnreachable, QQuickWebEngineDownloadItem::ServerUnreachable)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::UserCanceled, QQuickWebEngineDownloadItem::UserCanceled)
+//ASSERT_ENUMS_MATCH(ProfileAdapterClient::UserShutdown, QQuickWebEngineDownloadItem::UserShutdown)
+//ASSERT_ENUMS_MATCH(ProfileAdapterClient::Crash, QQuickWebEngineDownloadItem::Crash)
static inline QQuickWebEngineDownloadItem::DownloadState toDownloadState(int state) {
switch (state) {
- case BrowserContextAdapterClient::DownloadInProgress:
+ case ProfileAdapterClient::DownloadInProgress:
return QQuickWebEngineDownloadItem::DownloadInProgress;
- case BrowserContextAdapterClient::DownloadCompleted:
+ case ProfileAdapterClient::DownloadCompleted:
return QQuickWebEngineDownloadItem::DownloadCompleted;
- case BrowserContextAdapterClient::DownloadCancelled:
+ case ProfileAdapterClient::DownloadCancelled:
return QQuickWebEngineDownloadItem::DownloadCancelled;
- case BrowserContextAdapterClient::DownloadInterrupted:
+ case ProfileAdapterClient::DownloadInterrupted:
return QQuickWebEngineDownloadItem::DownloadInterrupted;
default:
Q_UNREACHABLE();
@@ -163,7 +163,7 @@ QQuickWebEngineDownloadItemPrivate::~QQuickWebEngineDownloadItemPrivate()
WebEngineProfile::downloadFinished
*/
-void QQuickWebEngineDownloadItemPrivate::update(const BrowserContextAdapterClient::DownloadItemInfo &info)
+void QQuickWebEngineDownloadItemPrivate::update(const ProfileAdapterClient::DownloadItemInfo &info)
{
Q_Q(QQuickWebEngineDownloadItem);
@@ -557,8 +557,8 @@ QQuickWebEngineDownloadItem::DownloadInterruptReason QQuickWebEngineDownloadItem
*/
QString QQuickWebEngineDownloadItem::interruptReasonString() const
{
- return BrowserContextAdapterClient::downloadInterruptReasonToString(
- static_cast<BrowserContextAdapterClient::DownloadInterruptReason>(interruptReason()));
+ return ProfileAdapterClient::downloadInterruptReasonToString(
+ static_cast<ProfileAdapterClient::DownloadInterruptReason>(interruptReason()));
}
/*!
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
index b36494d17..631353738 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "browser_context_adapter_client.h"
+#include "profile_adapter_client.h"
#include "qquickwebenginedownloaditem_p.h"
#include "qquickwebengineprofile.h"
#include <QString>
@@ -81,7 +81,7 @@ public:
bool downloadFinished;
bool downloadPaused;
- void update(const QtWebEngineCore::BrowserContextAdapterClient::DownloadItemInfo &info);
+ void update(const QtWebEngineCore::ProfileAdapterClient::DownloadItemInfo &info);
void updateState(QQuickWebEngineDownloadItem::DownloadState newState);
};
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 858b2bd95..f76741212 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -57,10 +57,10 @@ using QtWebEngineCore::ProfileAdapter;
QT_BEGIN_NAMESPACE
-ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::UnknownSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::UnknownSavePageFormat)
-ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::SingleHtmlSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::SingleHtmlSaveFormat)
-ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::CompleteHtmlSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::CompleteHtmlSaveFormat)
-ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::MimeHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::UnknownSaveFormat, QtWebEngineCore::ProfileAdapterClient::UnknownSavePageFormat)
+ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::SingleHtmlSaveFormat, QtWebEngineCore::ProfileAdapterClient::SingleHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::CompleteHtmlSaveFormat, QtWebEngineCore::ProfileAdapterClient::CompleteHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineCore::ProfileAdapterClient::MimeHtmlSaveFormat)
/*!
\class QQuickWebEngineProfile
@@ -260,7 +260,7 @@ void QQuickWebEngineProfilePrivate::downloadUpdated(const DownloadItemInfo &info
download->d_func()->update(info);
- if (info.state != BrowserContextAdapterClient::DownloadInProgress) {
+ if (info.state != ProfileAdapterClient::DownloadInProgress) {
Q_EMIT q->downloadFinished(download);
m_ongoingDownloads.remove(info.id);
}
diff --git a/src/webengine/api/qquickwebengineprofile_p.h b/src/webengine/api/qquickwebengineprofile_p.h
index dcd634b42..9ed8b89de 100644
--- a/src/webengine/api/qquickwebengineprofile_p.h
+++ b/src/webengine/api/qquickwebengineprofile_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "browser_context_adapter_client.h"
+#include "profile_adapter_client.h"
#include "profile_adapter.h"
#include "qquickwebengineprofile_p.h"
@@ -66,7 +66,7 @@ class QQuickWebEngineDownloadItem;
class QQuickWebEngineSettings;
class QQuickWebEngineViewPrivate;
-class QQuickWebEngineProfilePrivate : public QtWebEngineCore::BrowserContextAdapterClient {
+class QQuickWebEngineProfilePrivate : public QtWebEngineCore::ProfileAdapterClient {
public:
Q_DECLARE_PUBLIC(QQuickWebEngineProfile)
QQuickWebEngineProfilePrivate(QtWebEngineCore::ProfileAdapter *profileAdapter);
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index 25813cfef..631c028c3 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -46,46 +46,46 @@
QT_BEGIN_NAMESPACE
-using QtWebEngineCore::BrowserContextAdapterClient;
-
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NoReason, QWebEngineDownloadItem::NoReason)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileFailed, QWebEngineDownloadItem::FileFailed)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileAccessDenied, QWebEngineDownloadItem::FileAccessDenied)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileNoSpace, QWebEngineDownloadItem::FileNoSpace)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileNameTooLong, QWebEngineDownloadItem::FileNameTooLong)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileTooLarge, QWebEngineDownloadItem::FileTooLarge)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileVirusInfected, QWebEngineDownloadItem::FileVirusInfected)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileTransientError, QWebEngineDownloadItem::FileTransientError)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileBlocked, QWebEngineDownloadItem::FileBlocked)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileSecurityCheckFailed, QWebEngineDownloadItem::FileSecurityCheckFailed)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileTooShort, QWebEngineDownloadItem::FileTooShort)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::FileHashMismatch, QWebEngineDownloadItem::FileHashMismatch)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkFailed, QWebEngineDownloadItem::NetworkFailed)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkTimeout, QWebEngineDownloadItem::NetworkTimeout)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkDisconnected, QWebEngineDownloadItem::NetworkDisconnected)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkServerDown, QWebEngineDownloadItem::NetworkServerDown)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::NetworkInvalidRequest, QWebEngineDownloadItem::NetworkInvalidRequest)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerFailed, QWebEngineDownloadItem::ServerFailed)
-//ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerNoRange, QWebEngineDownloadItem::ServerNoRange)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerBadContent, QWebEngineDownloadItem::ServerBadContent)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerUnauthorized, QWebEngineDownloadItem::ServerUnauthorized)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerCertProblem, QWebEngineDownloadItem::ServerCertProblem)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerForbidden, QWebEngineDownloadItem::ServerForbidden)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::ServerUnreachable, QWebEngineDownloadItem::ServerUnreachable)
-ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::UserCanceled, QWebEngineDownloadItem::UserCanceled)
-//ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::UserShutdown, QWebEngineDownloadItem::UserShutdown)
-//ASSERT_ENUMS_MATCH(BrowserContextAdapterClient::Crash, QWebEngineDownloadItem::Crash)
+using QtWebEngineCore::ProfileAdapterClient;
+
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NoReason, QWebEngineDownloadItem::NoReason)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileFailed, QWebEngineDownloadItem::FileFailed)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileAccessDenied, QWebEngineDownloadItem::FileAccessDenied)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileNoSpace, QWebEngineDownloadItem::FileNoSpace)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileNameTooLong, QWebEngineDownloadItem::FileNameTooLong)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileTooLarge, QWebEngineDownloadItem::FileTooLarge)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileVirusInfected, QWebEngineDownloadItem::FileVirusInfected)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileTransientError, QWebEngineDownloadItem::FileTransientError)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileBlocked, QWebEngineDownloadItem::FileBlocked)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileSecurityCheckFailed, QWebEngineDownloadItem::FileSecurityCheckFailed)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileTooShort, QWebEngineDownloadItem::FileTooShort)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::FileHashMismatch, QWebEngineDownloadItem::FileHashMismatch)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkFailed, QWebEngineDownloadItem::NetworkFailed)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkTimeout, QWebEngineDownloadItem::NetworkTimeout)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkDisconnected, QWebEngineDownloadItem::NetworkDisconnected)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkServerDown, QWebEngineDownloadItem::NetworkServerDown)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::NetworkInvalidRequest, QWebEngineDownloadItem::NetworkInvalidRequest)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerFailed, QWebEngineDownloadItem::ServerFailed)
+//ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerNoRange, QWebEngineDownloadItem::ServerNoRange)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerBadContent, QWebEngineDownloadItem::ServerBadContent)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerUnauthorized, QWebEngineDownloadItem::ServerUnauthorized)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerCertProblem, QWebEngineDownloadItem::ServerCertProblem)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerForbidden, QWebEngineDownloadItem::ServerForbidden)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::ServerUnreachable, QWebEngineDownloadItem::ServerUnreachable)
+ASSERT_ENUMS_MATCH(ProfileAdapterClient::UserCanceled, QWebEngineDownloadItem::UserCanceled)
+//ASSERT_ENUMS_MATCH(ProfileAdapterClient::UserShutdown, QWebEngineDownloadItem::UserShutdown)
+//ASSERT_ENUMS_MATCH(ProfileAdapterClient::Crash, QWebEngineDownloadItem::Crash)
static inline QWebEngineDownloadItem::DownloadState toDownloadState(int state)
{
switch (state) {
- case BrowserContextAdapterClient::DownloadInProgress:
+ case ProfileAdapterClient::DownloadInProgress:
return QWebEngineDownloadItem::DownloadInProgress;
- case BrowserContextAdapterClient::DownloadCompleted:
+ case ProfileAdapterClient::DownloadCompleted:
return QWebEngineDownloadItem::DownloadCompleted;
- case BrowserContextAdapterClient::DownloadCancelled:
+ case ProfileAdapterClient::DownloadCancelled:
return QWebEngineDownloadItem::DownloadCancelled;
- case BrowserContextAdapterClient::DownloadInterrupted:
+ case ProfileAdapterClient::DownloadInterrupted:
return QWebEngineDownloadItem::DownloadInterrupted;
default:
Q_UNREACHABLE();
@@ -176,7 +176,7 @@ QWebEngineDownloadItemPrivate::~QWebEngineDownloadItemPrivate()
{
}
-void QWebEngineDownloadItemPrivate::update(const BrowserContextAdapterClient::DownloadItemInfo &info)
+void QWebEngineDownloadItemPrivate::update(const ProfileAdapterClient::DownloadItemInfo &info)
{
Q_Q(QWebEngineDownloadItem);
@@ -626,8 +626,8 @@ QWebEngineDownloadItem::DownloadInterruptReason QWebEngineDownloadItem::interrup
QString QWebEngineDownloadItem::interruptReasonString() const
{
- return BrowserContextAdapterClient::downloadInterruptReasonToString(
- static_cast<BrowserContextAdapterClient::DownloadInterruptReason>(interruptReason()));
+ return ProfileAdapterClient::downloadInterruptReasonToString(
+ static_cast<ProfileAdapterClient::DownloadInterruptReason>(interruptReason()));
}
QWebEngineDownloadItem::QWebEngineDownloadItem(QWebEngineDownloadItemPrivate *p, QObject *parent)
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem_p.h b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
index da765e5c5..514beacc7 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem_p.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
@@ -82,7 +82,7 @@ public:
qint64 totalBytes;
qint64 receivedBytes;
- void update(const QtWebEngineCore::BrowserContextAdapterClient::DownloadItemInfo &info);
+ void update(const QtWebEngineCore::ProfileAdapterClient::DownloadItemInfo &info);
};
QT_END_NAMESPACE
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index 68f9365b9..a7a7ea19b 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -54,10 +54,10 @@
QT_BEGIN_NAMESPACE
-ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::UnknownSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::UnknownSavePageFormat)
-ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::SingleHtmlSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::SingleHtmlSaveFormat)
-ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::CompleteHtmlSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::CompleteHtmlSaveFormat)
-ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineCore::BrowserContextAdapterClient::MimeHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::UnknownSaveFormat, QtWebEngineCore::ProfileAdapterClient::UnknownSavePageFormat)
+ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::SingleHtmlSaveFormat, QtWebEngineCore::ProfileAdapterClient::SingleHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::CompleteHtmlSaveFormat, QtWebEngineCore::ProfileAdapterClient::CompleteHtmlSaveFormat)
+ASSERT_ENUMS_MATCH(QWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineCore::ProfileAdapterClient::MimeHtmlSaveFormat)
using QtWebEngineCore::ProfileAdapter;
@@ -212,7 +212,7 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
QWebEngineDownloadItem::DownloadState state = download->state();
info.path = download->path();
- info.savePageFormat = static_cast<QtWebEngineCore::BrowserContextAdapterClient::SavePageFormat>(
+ info.savePageFormat = static_cast<QtWebEngineCore::ProfileAdapterClient::SavePageFormat>(
download->savePageFormat());
info.accepted = state != QWebEngineDownloadItem::DownloadCancelled;
diff --git a/src/webenginewidgets/api/qwebengineprofile_p.h b/src/webenginewidgets/api/qwebengineprofile_p.h
index c86b897b5..9ff8df849 100644
--- a/src/webenginewidgets/api/qwebengineprofile_p.h
+++ b/src/webenginewidgets/api/qwebengineprofile_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "browser_context_adapter_client.h"
+#include "profile_adapter_client.h"
#include "qwebengineprofile.h"
#include "qwebenginescriptcollection.h"
@@ -70,7 +70,7 @@ class QWebEngineBrowserContext;
class QWebEngineProfilePrivate;
class QWebEngineSettings;
-class QWebEngineProfilePrivate : public QtWebEngineCore::BrowserContextAdapterClient {
+class QWebEngineProfilePrivate : public QtWebEngineCore::ProfileAdapterClient {
public:
Q_DECLARE_PUBLIC(QWebEngineProfile)
QWebEngineProfilePrivate(QtWebEngineCore::ProfileAdapter *profileAdapter);