summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@theqtcompany.com>2014-12-03 15:34:09 +0100
committerZeno Albisser <zeno.albisser@digia.com>2015-01-20 08:34:08 +0100
commit390a6fda73369e447569efb1e8a7622460307d22 (patch)
treee4a887e1aab1c04809c001578182add78df7c9b4 /src/core
parent91cc1c217bd370f27dc1f063f70dec3786a1f3bf (diff)
Update Chromium to version 40.0.2214.28 and ninja to 1.5.3.
* scoped_refptr operator for implicit conversion to pointer has been disabled upstream: https://codereview.chromium.org/510323002 * Group permission API as done upstream: https://codereview.chromium.org/622793002 * content_worker gyp target has been removed upstream. * GetPageThumbnailData moved to DevToolsManagerDelegate. * ui/ui_resources has been renamed to ui/resources * WebPreferences and ResourceType have moved inside content. * Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(): https://codereview.chromium.org/457103003 * Remove obsolete accessibility events. * AX_EVENT_SELECTED_TEXT_CHANGED has been renamed to AX_EVENT_TEXT_SELECTION_CHANGED * AX_ROLE_MATH_ELEMENT was removed upstream. https://codereview.chromium.org/695133002 * Screen::IsDIPEnabled has been removed upstream. https://codereview.chromium.org/672823002 * Update DevToolsHttpHandlerDelegateQt according to ShellDevToolsManagerDelegate. * Various functionality from DevToolsHttpHandler was moved to DevToolsManagerDelegate https://codereview.chromium.org/560323005 * DevToolsHttpHandler::Start expects a scoped_ptr now. * Make sure event_factory_evdev.h is not included when USE_OZONE is not defined * ErrorPageParams was moved into namespace error_page. * Media Access is now handled by ContentBrowserClient::CheckMediaAccessPermission * SpecialStoragePolicy moved to namespace storage * Add implementation for new pure virtual function BrowserContext::GetSSLHostStateDelegate. * RenderPass::Id was renamed to RenderPass::RenderPassId * Include view_messages.h for ViewHostMsg_TextInputState_Param * CERT_UNABLE_TO_CHECK_REVOCATION has been deprecated by Chromium: https://codereview.chromium.org/449743002 * MailboxManager::ConsumeTexture only takes the mailbox as an argument * Replace RWHVQt::TextInputStateChanged with RWHVQt::TextInputTypeChanged. * RenderWidgetHostView::ScrollOffsetChanged has been removed. * SkBitmap::Config was removed upstream. * CopyFromCompositingSurfaceCallback has become an own type. * AcceleratedSurfaceInitialized only takes route_id as an argument. * ServerBoundCertService has been renamed to ChannelIDService. Related API has been renamed accordingly. * TextureImageTransportSurface was removed upstream. * Update MediaCaptureDispatcher::OnMediaRequestStateChanged signature. * AudioStream related functions are gone upstream. https://codereview.chromium.org/569713002 * Add implementation for RenderWidgetHostViewQt::GetLastScrollOffset. * Include generic touch_device implementation. * switches::kDisableDesktopNotifications was removed upstream. https://codereview.chromium.org/607843002 * PageTransition moved to ui. * Messages headers are not guarded. Including them multiple times does hurt. * ScaleGestureDetector does not create a standalone GestureDetector anymore. https://codereview.chromium.org/501503003 * MotionEvent::Cancel and Clone are not virtual anymore. https://codereview.chromium.org/502993004 * Exclude os_exchange_data_provider_mac from build. * Remove argument from ScopedClipboardWriter ctor. https://codereview.chromium.org/558913003 * Remove ShowPopupMenu override from WebContentsQt. The function is not pure virtual anymore, and we never implemented any specifics. * Do not use clang on desktop linux. * Request functions in ContentBrowserClient were merged into RequestPermission. * ninja: use configure.py --bootstrap instead of bootstrap.py Change-Id: I3575612826db7845461a949b4e737264bb4e8d88 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/browser_accessibility_manager_qt.cpp21
-rw-r--r--src/core/browser_accessibility_qt.cpp2
-rw-r--r--src/core/browser_context_adapter.cpp16
-rw-r--r--src/core/browser_context_qt.cpp7
-rw-r--r--src/core/browser_context_qt.h3
-rw-r--r--src/core/certificate_error_controller.cpp7
-rw-r--r--src/core/certificate_error_controller_p.h2
-rw-r--r--src/core/chrome_qt.gyp2
-rw-r--r--src/core/chromium_gpu_helper.cpp3
-rw-r--r--src/core/chromium_overrides.cpp2
-rw-r--r--src/core/config/desktop_linux.pri2
-rw-r--r--src/core/content_browser_client_qt.cpp28
-rw-r--r--src/core/content_browser_client_qt.h18
-rw-r--r--src/core/content_main_delegate_qt.cpp2
-rw-r--r--src/core/delegated_frame_node.cpp12
-rw-r--r--src/core/delegated_frame_node.h2
-rw-r--r--src/core/desktop_screen_qt.cpp7
-rw-r--r--src/core/desktop_screen_qt.h1
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.cpp75
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.h3
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp51
-rw-r--r--src/core/media_capture_devices_dispatcher.h8
-rw-r--r--src/core/network_delegate_qt.cpp24
-rw-r--r--src/core/ozone_platform_eglfs.cpp3
-rw-r--r--src/core/ozone_platform_eglfs.h4
-rw-r--r--src/core/qtwebengine.gypi4
-rw-r--r--src/core/qtwebengine_extras.gypi1
-rw-r--r--src/core/render_widget_host_view_qt.cpp104
-rw-r--r--src/core/render_widget_host_view_qt.h22
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp5
-rw-r--r--src/core/resource_context_qt.h3
-rw-r--r--src/core/resources/repack_resources.gypi8
-rw-r--r--src/core/resources/resources.gyp4
-rw-r--r--src/core/url_request_context_getter_qt.cpp14
-rw-r--r--src/core/web_contents_adapter.cpp12
-rw-r--r--src/core/web_contents_adapter.h4
-rw-r--r--src/core/web_contents_delegate_qt.cpp44
-rw-r--r--src/core/web_contents_delegate_qt.h24
-rw-r--r--src/core/web_contents_view_qt.cpp2
-rw-r--r--src/core/web_contents_view_qt.h11
-rw-r--r--src/core/web_engine_context.cpp3
-rw-r--r--src/core/web_engine_library_info.cpp2
-rw-r--r--src/core/web_engine_settings.cpp22
-rw-r--r--src/core/web_engine_settings.h9
44 files changed, 293 insertions, 310 deletions
diff --git a/src/core/browser_accessibility_manager_qt.cpp b/src/core/browser_accessibility_manager_qt.cpp
index 28d0dd7e3..1adb69be7 100644
--- a/src/core/browser_accessibility_manager_qt.cpp
+++ b/src/core/browser_accessibility_manager_qt.cpp
@@ -43,6 +43,14 @@ using namespace blink;
namespace content {
+BrowserAccessibilityManager* BrowserAccessibilityManager::Create(
+ const ui::AXTreeUpdate& initial_tree,
+ BrowserAccessibilityDelegate* delegate,
+ BrowserAccessibilityFactory* factory)
+{
+ return new BrowserAccessibilityManagerQt(0, initial_tree, delegate);
+}
+
BrowserAccessibility *BrowserAccessibilityFactoryQt::Create()
{
return new BrowserAccessibilityQt();
@@ -95,23 +103,12 @@ void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(ui::AXEvent event_t
break;
case ui::AX_EVENT_LOAD_COMPLETE:
break;
-
case ui::AX_EVENT_TEXT_CHANGED: {
QAccessibleTextUpdateEvent event(iface, -1, QString(), QString());
QAccessible::updateAccessibility(&event);
break;
}
- case ui::AX_EVENT_TEXT_INSERTED: {
- QAccessibleTextInsertEvent event(iface, -1, QString());
- QAccessible::updateAccessibility(&event);
- break;
- }
- case ui::AX_EVENT_TEXT_REMOVED: {
- QAccessibleTextRemoveEvent event(iface, -1, QString());
- QAccessible::updateAccessibility(&event);
- break;
- }
- case ui::AX_EVENT_SELECTED_TEXT_CHANGED: {
+ case ui::AX_EVENT_TEXT_SELECTION_CHANGED: {
QAccessibleTextInterface *textIface = iface->textInterface();
if (textIface) {
int start = 0;
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index b5cd26f2f..8f0dd0572 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -384,8 +384,6 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::NoRole; // FIXME
case ui::AX_ROLE_MATH:
return QAccessible::Equation;
- case ui::AX_ROLE_MATH_ELEMENT:
- return QAccessible::Equation;
case ui::AX_ROLE_MATTE:
return QAccessible::NoRole; // FIXME
case ui::AX_ROLE_MENU:
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 95ddc4d87..586d2c2ef 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -96,7 +96,7 @@ void BrowserContextAdapter::setStorageName(const QString &storageName)
if (storageName == m_name)
return;
m_name = storageName;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateStorageSettings();
m_visitedLinksManager.reset();
}
@@ -106,7 +106,7 @@ void BrowserContextAdapter::setOffTheRecord(bool offTheRecord)
if (offTheRecord == m_offTheRecord)
return;
m_offTheRecord = offTheRecord;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateStorageSettings();
m_visitedLinksManager.reset();
}
@@ -166,7 +166,7 @@ void BrowserContextAdapter::setDataPath(const QString &path)
if (m_dataPath == path)
return;
m_dataPath = path;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateStorageSettings();
m_visitedLinksManager.reset();
}
@@ -187,7 +187,7 @@ void BrowserContextAdapter::setCachePath(const QString &path)
if (m_cachePath == path)
return;
m_cachePath = path;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateHttpCache();
}
@@ -223,7 +223,7 @@ void BrowserContextAdapter::setHttpUserAgent(const QString &userAgent)
if (m_httpUserAgent == userAgent)
return;
m_httpUserAgent = userAgent;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateUserAgent();
}
@@ -240,7 +240,7 @@ void BrowserContextAdapter::setHttpCacheType(BrowserContextAdapter::HttpCacheTyp
m_httpCacheType = newhttpCacheType;
if (oldCacheType == httpCacheType())
return;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateHttpCache();
}
@@ -257,7 +257,7 @@ void BrowserContextAdapter::setPersistentCookiesPolicy(BrowserContextAdapter::Pe
m_persistentCookiesPolicy = newPersistentCookiesPolicy;
if (oldPolicy == persistentCookiesPolicy())
return;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateCookieStore();
}
@@ -311,6 +311,6 @@ void BrowserContextAdapter::setHttpCacheMaxSize(int maxSize)
if (m_httpCacheMaxSize == maxSize)
return;
m_httpCacheMaxSize = maxSize;
- if (m_browserContext->url_request_getter_)
+ if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateHttpCache();
}
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index 4661f59fc..7fcbdee07 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -116,7 +116,7 @@ content::BrowserPluginGuestManager *BrowserContextQt::GetGuestManager()
return 0;
}
-quota::SpecialStoragePolicy *BrowserContextQt::GetSpecialStoragePolicy()
+storage::SpecialStoragePolicy *BrowserContextQt::GetSpecialStoragePolicy()
{
QT_NOT_YET_IMPLEMENTED
return 0;
@@ -127,6 +127,11 @@ content::PushMessagingService *BrowserContextQt::GetPushMessagingService()
return 0;
}
+content::SSLHostStateDelegate* BrowserContextQt::GetSSLHostStateDelegate()
+{
+ return 0;
+}
+
net::URLRequestContextGetter *BrowserContextQt::CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers)
{
url_request_getter_ = new URLRequestContextGetterQt(m_adapter, protocol_handlers);
diff --git a/src/core/browser_context_qt.h b/src/core/browser_context_qt.h
index 8ab6024ae..baa60aaef 100644
--- a/src/core/browser_context_qt.h
+++ b/src/core/browser_context_qt.h
@@ -66,8 +66,9 @@ public:
virtual content::ResourceContext *GetResourceContext() Q_DECL_OVERRIDE;
virtual content::DownloadManagerDelegate *GetDownloadManagerDelegate() Q_DECL_OVERRIDE;
virtual content::BrowserPluginGuestManager* GetGuestManager() Q_DECL_OVERRIDE;
- virtual quota::SpecialStoragePolicy *GetSpecialStoragePolicy() Q_DECL_OVERRIDE;
+ virtual storage::SpecialStoragePolicy *GetSpecialStoragePolicy() Q_DECL_OVERRIDE;
virtual content::PushMessagingService* GetPushMessagingService() Q_DECL_OVERRIDE;
+ virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() Q_DECL_OVERRIDE;
net::URLRequestContextGetter *CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers);
private:
diff --git a/src/core/certificate_error_controller.cpp b/src/core/certificate_error_controller.cpp
index b5c705de3..365caed22 100644
--- a/src/core/certificate_error_controller.cpp
+++ b/src/core/certificate_error_controller.cpp
@@ -51,7 +51,7 @@ void CertificateErrorControllerPrivate::accept(bool accepted)
CertificateErrorControllerPrivate::CertificateErrorControllerPrivate(int cert_error,
const net::SSLInfo& ssl_info,
const GURL &request_url,
- ResourceType::Type resource_type,
+ content::ResourceType resource_type,
bool _overridable,
bool strict_enforcement,
const base::Callback<void(bool)>& cb
@@ -63,7 +63,7 @@ CertificateErrorControllerPrivate::CertificateErrorControllerPrivate(int cert_er
, strictEnforcement(strict_enforcement)
, callback(cb)
{
- if (ssl_info.cert) {
+ if (ssl_info.cert.get()) {
validStart = toQt(ssl_info.cert->valid_start());
validExpiry = toQt(ssl_info.cert->valid_expiry());
}
@@ -135,8 +135,6 @@ QString CertificateErrorController::errorString() const
return getQStringForMessageId(IDS_CERT_ERROR_CONTAINS_ERRORS_DESCRIPTION);
case CertificateNoRevocationMechanism:
return getQStringForMessageId(IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DETAILS);
- case CertificateUnableToCheckRevocation:
- return getQStringForMessageId(IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DETAILS);
case CertificateRevoked:
return getQStringForMessageId(IDS_CERT_ERROR_REVOKED_CERT_DESCRIPTION);
case CertificateInvalid:
@@ -149,6 +147,7 @@ QString CertificateErrorController::errorString() const
return getQStringForMessageId(IDS_CERT_ERROR_WEAK_KEY_DESCRIPTION);
case CertificateNameConstraintViolation:
return getQStringForMessageId(IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DESCRIPTION);
+ case CertificateUnableToCheckRevocation: // Deprecated in Chromium.
default:
break;
}
diff --git a/src/core/certificate_error_controller_p.h b/src/core/certificate_error_controller_p.h
index af0ce12aa..b5a8bd2ef 100644
--- a/src/core/certificate_error_controller_p.h
+++ b/src/core/certificate_error_controller_p.h
@@ -43,7 +43,7 @@
class CertificateErrorControllerPrivate {
public:
- CertificateErrorControllerPrivate(int cert_error, const net::SSLInfo& ssl_info, const GURL& request_url, ResourceType::Type resource_type, bool overridable, bool strict_enforcement, const base::Callback<void(bool)>& callback);
+ CertificateErrorControllerPrivate(int cert_error, const net::SSLInfo& ssl_info, const GURL& request_url, content::ResourceType resource_type, bool overridable, bool strict_enforcement, const base::Callback<void(bool)>& callback);
void accept(bool accepted);
diff --git a/src/core/chrome_qt.gyp b/src/core/chrome_qt.gyp
index 81ab2e881..703ce7525 100644
--- a/src/core/chrome_qt.gyp
+++ b/src/core/chrome_qt.gyp
@@ -21,8 +21,6 @@
'<(chromium_src_dir)/chrome/browser/media/desktop_media_list.h',
'<(chromium_src_dir)/chrome/common/localized_error.cc',
'<(chromium_src_dir)/chrome/common/localized_error.h',
- '<(chromium_src_dir)/chrome/common/net/net_error_info.cc',
- '<(chromium_src_dir)/chrome/common/net/net_error_info.h',
],
},
{
diff --git a/src/core/chromium_gpu_helper.cpp b/src/core/chromium_gpu_helper.cpp
index 6287bd7c0..8ea8ad20d 100644
--- a/src/core/chromium_gpu_helper.cpp
+++ b/src/core/chromium_gpu_helper.cpp
@@ -96,7 +96,8 @@ gpu::gles2::MailboxManager *mailbox_manager()
gpu::gles2::Texture* ConsumeTexture(gpu::gles2::MailboxManager *mailboxManager, unsigned target, const gpu::Mailbox& mailbox)
{
- return mailboxManager->ConsumeTexture(target, mailbox);
+ Q_UNUSED(target);
+ return mailboxManager->ConsumeTexture(mailbox);
}
unsigned int service_id(gpu::gles2::Texture *tex)
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index 9e97e3226..bb71d0d35 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -156,6 +156,7 @@ RenderText* RenderText::CreateNativeInstance()
return 0;
}
+#if defined(OS_LINUX)
PlatformFont* PlatformFont::CreateDefault()
{
QT_NOT_USED;
@@ -173,6 +174,7 @@ PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string&, int)
QT_NOT_USED;
return 0;
}
+#endif
} // namespace gfx
diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri
index 7f28cb36b..5a904fb83 100644
--- a/src/core/config/desktop_linux.pri
+++ b/src/core/config/desktop_linux.pri
@@ -13,4 +13,6 @@ GYP_CONFIG += \
use_gnome_keyring=0 \
use_kerberos=0 \
use_pango=0 \
+ host_clang=0 \
+ clang=0 \
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 6dfaa64c7..232e2d9df 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -339,7 +339,7 @@ void ContentBrowserClientQt::ResourceDispatcherHostCreated()
gfx::GLShareGroup *ContentBrowserClientQt::GetInProcessGpuShareGroup()
{
- if (!m_shareGroupQtQuick)
+ if (!m_shareGroupQtQuick.get())
m_shareGroupQtQuick = new ShareGroupQtQuick;
return m_shareGroupQtQuick.get();
}
@@ -349,7 +349,7 @@ content::MediaObserver *ContentBrowserClientQt::GetMediaObserver()
return MediaCaptureDevicesDispatcher::GetInstance();
}
-void ContentBrowserClientQt::OverrideWebkitPrefs(content::RenderViewHost *rvh, const GURL &url, WebPreferences *web_prefs)
+void ContentBrowserClientQt::OverrideWebkitPrefs(content::RenderViewHost *rvh, const GURL &url, content::WebPreferences *web_prefs)
{
Q_UNUSED(url);
if (content::WebContents *webContents = rvh->GetDelegate()->GetAsWebContents())
@@ -382,8 +382,9 @@ content::QuotaPermissionContext *ContentBrowserClientQt::CreateQuotaPermissionCo
void ContentBrowserClientQt::AllowCertificateError(int render_process_id, int render_frame_id, int cert_error,
const net::SSLInfo& ssl_info, const GURL& request_url,
- ResourceType::Type resource_type,
+ content::ResourceType resource_type,
bool overridable, bool strict_enforcement,
+ bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* result)
{
@@ -399,16 +400,27 @@ void ContentBrowserClientQt::AllowCertificateError(int render_process_id, int re
contentsDelegate->allowCertificateError(errorController);
}
-void ContentBrowserClientQt::RequestGeolocationPermission(content::WebContents *webContents, int /*bridgeId*/, const GURL &requestingFrameOrigin, bool /*userGesture*/, base::Callback<void (bool)> resultCallback, base::Closure *cancelCallback)
+void ContentBrowserClientQt::RequestPermission(content::PermissionType permission,
+ content::WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ const base::Callback<void(bool)>& result_callback)
{
- WebContentsDelegateQt* contentsDelegate = static_cast<WebContentsDelegateQt*>(webContents->GetDelegate());
+ Q_UNUSED(bridge_id);
+ Q_UNUSED(requesting_frame);
+ Q_UNUSED(user_gesture);
+ WebContentsDelegateQt* contentsDelegate = static_cast<WebContentsDelegateQt*>(web_contents->GetDelegate());
Q_ASSERT(contentsDelegate);
- contentsDelegate->requestGeolocationPermission(requestingFrameOrigin, resultCallback, cancelCallback);
+ if (permission == content::PERMISSION_GEOLOCATION)
+ contentsDelegate->requestGeolocationPermission(requesting_frame, result_callback);
+ else
+ result_callback.Run(false);
}
-blink::WebNotificationPresenter::Permission ContentBrowserClientQt::CheckDesktopNotificationPermission(const GURL&, content::ResourceContext *, int )
+blink::WebNotificationPermission ContentBrowserClientQt::CheckDesktopNotificationPermission(const GURL&, content::ResourceContext *, int )
{
- return blink::WebNotificationPresenter::PermissionDenied;
+ return blink::WebNotificationPermission::WebNotificationPermissionDenied;
}
content::LocationProvider *ContentBrowserClientQt::OverrideSystemLocationProvider()
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index d5b49e835..7b5ca49af 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -40,6 +40,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/content_browser_client.h"
+#include "third_party/WebKit/public/platform/WebNotificationPermission.h"
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
@@ -81,26 +82,31 @@ public:
virtual content::MediaObserver* GetMediaObserver() Q_DECL_OVERRIDE;
virtual content::AccessTokenStore* CreateAccessTokenStore() Q_DECL_OVERRIDE;
virtual content::QuotaPermissionContext *CreateQuotaPermissionContext() Q_DECL_OVERRIDE;
- virtual void OverrideWebkitPrefs(content::RenderViewHost *, const GURL &, WebPreferences *) Q_DECL_OVERRIDE;
+ virtual void OverrideWebkitPrefs(content::RenderViewHost *, const GURL &, content::WebPreferences *) Q_DECL_OVERRIDE;
virtual void AllowCertificateError(
int render_process_id,
int render_frame_id,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& request_url,
- ResourceType::Type resource_type,
+ content::ResourceType resource_type,
bool overridable,
bool strict_enforcement,
+ bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* result) Q_DECL_OVERRIDE;
- void RequestGeolocationPermission(content::WebContents* web_contents, int, const GURL& requesting_frame
- , bool, base::Callback<void(bool)> resultCallback
- , base::Closure* cancelCallback) Q_DECL_OVERRIDE;
+ virtual void RequestPermission(
+ content::PermissionType permission,
+ content::WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ const base::Callback<void(bool)>& result_callback) Q_DECL_OVERRIDE;
content::LocationProvider* OverrideSystemLocationProvider() Q_DECL_OVERRIDE;
virtual net::URLRequestContextGetter *CreateRequestContext(content::BrowserContext *browser_context, content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptorss) Q_DECL_OVERRIDE;
- virtual blink::WebNotificationPresenter::Permission CheckDesktopNotificationPermission(const GURL& source_origin, content::ResourceContext* context, int render_process_id) Q_DECL_OVERRIDE;
+ virtual blink::WebNotificationPermission CheckDesktopNotificationPermission(const GURL& source_origin, content::ResourceContext* context, int render_process_id) Q_DECL_OVERRIDE;
virtual std::string GetApplicationLocale() Q_DECL_OVERRIDE;
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 44dc0b8bd..a997e398c 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -65,7 +65,7 @@ static base::StringPiece PlatformResourceProvider(int key) {
void ContentMainDelegateQt::PreSandboxStartup()
{
net::NetModule::SetResourceProvider(PlatformResourceProvider);
- ui::ResourceBundle::InitSharedInstanceWithLocale(QLocale().name().toStdString(), 0);
+ ui::ResourceBundle::InitSharedInstanceWithLocale(QLocale().name().toStdString(), 0, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
// Suppress info, warning and error messages per default.
int logLevel = logging::LOG_FATAL;
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 8d09794be..33ffbc66a 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -125,9 +125,9 @@ private:
QSGGeometry m_geometry;
};
-static inline QSharedPointer<QSGLayer> findRenderPassLayer(const cc::RenderPass::Id &id, const QList<QPair<cc::RenderPass::Id, QSharedPointer<QSGLayer> > > &list)
+static inline QSharedPointer<QSGLayer> findRenderPassLayer(const cc::RenderPassId &id, const QList<QPair<cc::RenderPassId, QSharedPointer<QSGLayer> > > &list)
{
- typedef QPair<cc::RenderPass::Id, QSharedPointer<QSGLayer> > Pair;
+ typedef QPair<cc::RenderPassId, QSharedPointer<QSGLayer> > Pair;
Q_FOREACH (const Pair &pair, list)
if (pair.first == id)
return pair.second;
@@ -433,7 +433,7 @@ void DelegatedFrameNode::preprocess()
}
// Then render any intermediate RenderPass in order.
- typedef QPair<cc::RenderPass::Id, QSharedPointer<QSGLayer> > Pair;
+ typedef QPair<cc::RenderPassId, QSharedPointer<QSGLayer> > Pair;
Q_FOREACH (const Pair &pair, m_sgObjects.renderPassLayers) {
// The layer is non-live, request a one-time update here.
pair.second->scheduleUpdate();
@@ -485,7 +485,7 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
delete oldChain;
// The RenderPasses list is actually a tree where a parent RenderPass is connected
- // to its dependencies through a RenderPass::Id reference in one or more RenderPassQuads.
+ // to its dependencies through a RenderPassId reference in one or more RenderPassQuads.
// The list is already ordered with intermediate RenderPasses placed before their
// parent, with the last one in the list being the root RenderPass, the one
// that we displayed to the user.
@@ -509,7 +509,7 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
rpLayer->setSize(toQt(pass->output_rect.size()));
rpLayer->setFormat(pass->has_transparent_background ? GL_RGBA : GL_RGB);
rpLayer->setItem(rootNode.data());
- m_sgObjects.renderPassLayers.append(QPair<cc::RenderPass::Id, QSharedPointer<QSGLayer> >(pass->id, rpLayer));
+ m_sgObjects.renderPassLayers.append(QPair<cc::RenderPassId, QSharedPointer<QSGLayer> >(pass->id, rpLayer));
m_sgObjects.renderPassRootNodes.append(rootNode);
renderPassParent = rootNode.data();
} else
@@ -522,7 +522,7 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
cc::QuadList::ConstBackToFrontIterator it = pass->quad_list.BackToFrontBegin();
cc::QuadList::ConstBackToFrontIterator end = pass->quad_list.BackToFrontEnd();
for (; it != end; ++it) {
- cc::DrawQuad *quad = *it;
+ const cc::DrawQuad *quad = *it;
if (currentLayerState != quad->shared_quad_state) {
currentLayerState = quad->shared_quad_state;
diff --git a/src/core/delegated_frame_node.h b/src/core/delegated_frame_node.h
index b866c94b4..3ef984a09 100644
--- a/src/core/delegated_frame_node.h
+++ b/src/core/delegated_frame_node.h
@@ -88,7 +88,7 @@ private:
QExplicitlySharedDataPointer<ChromiumCompositorData> m_chromiumCompositorData;
struct SGObjects {
- QList<QPair<cc::RenderPass::Id, QSharedPointer<QSGLayer> > > renderPassLayers;
+ QList<QPair<cc::RenderPassId, QSharedPointer<QSGLayer> > > renderPassLayers;
QList<QSharedPointer<QSGRootNode> > renderPassRootNodes;
QList<QSharedPointer<QSGTexture> > textureStrongRefs;
} m_sgObjects;
diff --git a/src/core/desktop_screen_qt.cpp b/src/core/desktop_screen_qt.cpp
index 34b02e379..1d9114260 100644
--- a/src/core/desktop_screen_qt.cpp
+++ b/src/core/desktop_screen_qt.cpp
@@ -36,13 +36,6 @@
#include "desktop_screen_qt.h"
-bool DesktopScreenQt::IsDIPEnabled()
-{
- // Currently only used by GetScaleFactorForNativeView for drag events.
- // Short-circuit this until we can test any implementation properly in real code.
- return false;
-}
-
gfx::Point DesktopScreenQt::GetCursorScreenPoint()
{
Q_UNREACHABLE();
diff --git a/src/core/desktop_screen_qt.h b/src/core/desktop_screen_qt.h
index ad57c1616..bf0c589f7 100644
--- a/src/core/desktop_screen_qt.h
+++ b/src/core/desktop_screen_qt.h
@@ -44,7 +44,6 @@
class DesktopScreenQt : public gfx::Screen {
public:
// Overridden from gfx::Screen:
- virtual bool IsDIPEnabled() Q_DECL_OVERRIDE;
virtual gfx::Point GetCursorScreenPoint() Q_DECL_OVERRIDE;
virtual gfx::NativeWindow GetWindowUnderCursor() Q_DECL_OVERRIDE;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) Q_DECL_OVERRIDE;
diff --git a/src/core/dev_tools_http_handler_delegate_qt.cpp b/src/core/dev_tools_http_handler_delegate_qt.cpp
index 1bb8ec1f1..ba3e6d5b1 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.cpp
+++ b/src/core/dev_tools_http_handler_delegate_qt.cpp
@@ -57,7 +57,7 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/content_switches.h"
#include "net/socket/stream_listen_socket.h"
-#include "net/socket/tcp_listen_socket.h"
+#include "net/socket/tcp_server_socket.h"
using namespace content;
@@ -65,28 +65,40 @@ namespace {
const char kTargetTypePage[] = "page";
+class TCPServerSocketFactory
+ : public DevToolsHttpHandler::ServerSocketFactory {
+public:
+ TCPServerSocketFactory(const std::string& address, int port, int backlog)
+ : DevToolsHttpHandler::ServerSocketFactory(address, port, backlog) {}
+private:
+ scoped_ptr<net::ServerSocket> Create() const override {
+ return scoped_ptr<net::ServerSocket>(new net::TCPServerSocket(NULL, net::NetLog::Source()));
+ }
+ DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
+};
+
class Target : public content::DevToolsTarget {
public:
explicit Target(WebContents* web_contents);
- virtual std::string GetId() const OVERRIDE { return id_; }
- virtual std::string GetParentId() const OVERRIDE { return std::string(); }
- virtual std::string GetType() const OVERRIDE { return kTargetTypePage; }
- virtual std::string GetTitle() const OVERRIDE { return title_; }
- virtual std::string GetDescription() const OVERRIDE { return std::string(); }
- virtual GURL GetURL() const OVERRIDE { return url_; }
- virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; }
- virtual base::TimeTicks GetLastActivityTime() const OVERRIDE {
+ virtual std::string GetId() const override { return id_; }
+ virtual std::string GetParentId() const override { return std::string(); }
+ virtual std::string GetType() const override { return kTargetTypePage; }
+ virtual std::string GetTitle() const override { return title_; }
+ virtual std::string GetDescription() const override { return std::string(); }
+ virtual GURL GetURL() const override { return url_; }
+ virtual GURL GetFaviconURL() const override { return favicon_url_; }
+ virtual base::TimeTicks GetLastActivityTime() const override {
return last_activity_time_;
}
- virtual bool IsAttached() const OVERRIDE {
+ virtual bool IsAttached() const override {
return agent_host_->IsAttached();
}
- virtual scoped_refptr<DevToolsAgentHost> GetAgentHost() const OVERRIDE {
+ virtual scoped_refptr<DevToolsAgentHost> GetAgentHost() const override {
return agent_host_;
}
- virtual bool Activate() const OVERRIDE;
- virtual bool Close() const OVERRIDE;
+ virtual bool Activate() const override;
+ virtual bool Close() const override;
private:
scoped_refptr<DevToolsAgentHost> agent_host_;
@@ -98,7 +110,7 @@ private:
};
Target::Target(WebContents* web_contents) {
- agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents->GetRenderViewHost());
+ agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents);
id_ = agent_host_->GetId();
title_ = base::UTF16ToUTF8(web_contents->GetTitle());
url_ = web_contents->GetURL();
@@ -110,10 +122,7 @@ Target::Target(WebContents* web_contents) {
}
bool Target::Activate() const {
- RenderViewHost* rvh = agent_host_->GetRenderViewHost();
- if (!rvh)
- return false;
- WebContents* web_contents = WebContents::FromRenderViewHost(rvh);
+ WebContents *web_contents = agent_host_->GetWebContents();
if (!web_contents)
return false;
web_contents->GetDelegate()->ActivateContents(web_contents);
@@ -121,7 +130,10 @@ bool Target::Activate() const {
}
bool Target::Close() const {
- RenderViewHost* rvh = agent_host_->GetRenderViewHost();
+ WebContents *web_contents = agent_host_->GetWebContents();
+ if (!web_contents)
+ return false;
+ RenderViewHost* rvh = web_contents->GetRenderViewHost();
if (!rvh)
return false;
rvh->ClosePage();
@@ -143,7 +155,8 @@ DevToolsHttpHandlerDelegateQt::DevToolsHttpHandlerDelegateQt(BrowserContext* bro
if (base::StringToInt(portString, &portInt) && portInt > 0 && portInt < 65535)
listeningPort = portInt;
}
- m_devtoolsHttpHandler = DevToolsHttpHandler::Start(new net::TCPListenSocketFactory("0.0.0.0", listeningPort), std::string(), this, base::FilePath());
+ scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory> factory(new TCPServerSocketFactory("0.0.0.0", listeningPort, 1));
+ m_devtoolsHttpHandler = DevToolsHttpHandler::Start(factory.Pass(), std::string(), this, base::FilePath());
}
DevToolsHttpHandlerDelegateQt::~DevToolsHttpHandlerDelegateQt()
@@ -173,28 +186,6 @@ base::FilePath DevToolsHttpHandlerDelegateQt::GetDebugFrontendDir()
return base::FilePath();
}
-std::string DevToolsHttpHandlerDelegateQt::GetPageThumbnailData(const GURL& url)
-{
- return std::string();
-}
-
-scoped_ptr<DevToolsTarget> DevToolsHttpHandlerDelegateQt::CreateNewTarget(const GURL&)
-{
- return scoped_ptr<DevToolsTarget>();
-}
-
-void DevToolsHttpHandlerDelegateQt::EnumerateTargets(TargetCallback callback)
-{
- TargetList targets;
- std::vector<RenderViewHost*> rvh_list = content::DevToolsAgentHost::GetValidRenderViewHosts();
- for (std::vector<RenderViewHost*>::iterator it = rvh_list.begin(); it != rvh_list.end(); ++it) {
- WebContents* web_contents = WebContents::FromRenderViewHost(*it);
- if (web_contents)
- targets.push_back(new Target(web_contents));
- }
- callback.Run(targets);
-}
-
scoped_ptr<net::StreamListenSocket> DevToolsHttpHandlerDelegateQt::CreateSocketForTethering(net::StreamListenSocket::Delegate* delegate, std::string* name)
{
return scoped_ptr<net::StreamListenSocket>();
diff --git a/src/core/dev_tools_http_handler_delegate_qt.h b/src/core/dev_tools_http_handler_delegate_qt.h
index 06b690ae9..0a28cf5c6 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.h
+++ b/src/core/dev_tools_http_handler_delegate_qt.h
@@ -61,11 +61,8 @@ public:
virtual std::string GetDiscoveryPageHTML() Q_DECL_OVERRIDE;
virtual bool BundlesFrontendResources() Q_DECL_OVERRIDE;
virtual base::FilePath GetDebugFrontendDir() Q_DECL_OVERRIDE;
- virtual std::string GetPageThumbnailData(const GURL& url) Q_DECL_OVERRIDE;
- virtual scoped_ptr<content::DevToolsTarget> CreateNewTarget(const GURL&) Q_DECL_OVERRIDE;
// Requests the list of all inspectable targets.
// The caller gets the ownership of the returned targets.
- virtual void EnumerateTargets(TargetCallback callback) Q_DECL_OVERRIDE;
virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(net::StreamListenSocket::Delegate* delegate, std::string* name) Q_DECL_OVERRIDE;
private:
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index a8e964b4d..5d65a3391 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -254,14 +254,20 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
return;
}
- // The extension name that the stream is registered with.
- std::string originalExtensionName;
- // Resolve DesktopMediaID for the specified device id.
- content::DesktopMediaID mediaId =
- getDesktopStreamsRegistry()->RequestMediaForStreamId(
- request.requested_video_device_id, request.render_process_id,
- request.render_view_id, request.security_origin,
- &originalExtensionName);
+ content::WebContents* const web_contents_for_stream = content::WebContents::FromRenderFrameHost(
+ content::RenderFrameHost::FromID(request.render_process_id, request.render_frame_id));
+ content::RenderFrameHost* const main_frame = web_contents_for_stream ? web_contents_for_stream->GetMainFrame() : NULL;
+
+ content::DesktopMediaID mediaId;
+ if (main_frame) {
+ // The extension name that the stream is registered with.
+ std::string originalExtensionName;
+ // Resolve DesktopMediaID for the specified device id.
+ mediaId = getDesktopStreamsRegistry()->RequestMediaForStreamId(
+ request.requested_video_device_id, main_frame->GetProcess()->GetID(),
+ main_frame->GetRoutingID(), request.security_origin,
+ &originalExtensionName);
+ }
// Received invalid device id.
if (mediaId.type == content::DesktopMediaID::TYPE_NONE) {
@@ -391,37 +397,36 @@ DesktopStreamsRegistry *MediaCaptureDevicesDispatcher::getDesktopStreamsRegistry
return m_desktopStreamsRegistry.get();
}
-void MediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(int renderProcessId, int renderViewId, int pageRequestId, const GURL& securityOrigin
- , const content::MediaStreamDevice &device, content::MediaRequestState state)
+void MediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(int render_process_id, int render_frame_id, int page_request_id, const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state)
{
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(
&MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread,
- base::Unretained(this), renderProcessId, renderViewId,
- pageRequestId, device, state));
+ base::Unretained(this), render_process_id, render_frame_id,
+ page_request_id, security_origin, stream_type, state));
}
-void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int renderProcessId, int renderViewId, int pageRequestId
- , const content::MediaStreamDevice &device, content::MediaRequestState state)
+void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render_process_id, int render_frame_id, int page_request_id
+ , const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state)
{
// Track desktop capture sessions. Tracking is necessary to avoid unbalanced
// session counts since not all requests will reach MEDIA_REQUEST_STATE_DONE,
// but they will all reach MEDIA_REQUEST_STATE_CLOSING.
- if (device.type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
+ if (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
if (state == content::MEDIA_REQUEST_STATE_DONE) {
- DesktopCaptureSession session = { renderProcessId, renderViewId,
- pageRequestId };
+ DesktopCaptureSession session = { render_process_id, render_frame_id,
+ page_request_id };
m_desktopCaptureSessions.push_back(session);
} else if (state == content::MEDIA_REQUEST_STATE_CLOSING) {
for (DesktopCaptureSessions::iterator it =
m_desktopCaptureSessions.begin();
it != m_desktopCaptureSessions.end();
++it) {
- if (it->render_process_id == renderProcessId &&
- it->render_view_id == renderViewId &&
- it->page_request_id == pageRequestId) {
+ if (it->render_process_id == render_process_id &&
+ it->render_view_id == render_frame_id &&
+ it->page_request_id == page_request_id) {
m_desktopCaptureSessions.erase(it);
break;
}
@@ -437,9 +442,9 @@ void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render
RequestsQueue &queue = rqs_it->second;
for (RequestsQueue::iterator it = queue.begin();
it != queue.end(); ++it) {
- if (it->request.render_process_id == renderProcessId &&
- it->request.render_view_id == renderViewId &&
- it->request.page_request_id == pageRequestId) {
+ if (it->request.render_process_id == render_process_id &&
+ it->request.render_frame_id == render_frame_id &&
+ it->request.page_request_id == page_request_id) {
queue.erase(it);
found = true;
break;
diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h
index 2c2988857..e0d6cff1d 100644
--- a/src/core/media_capture_devices_dispatcher.h
+++ b/src/core/media_capture_devices_dispatcher.h
@@ -75,12 +75,9 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
// Overridden from content::MediaObserver:
virtual void OnAudioCaptureDevicesChanged() Q_DECL_OVERRIDE { }
virtual void OnVideoCaptureDevicesChanged() Q_DECL_OVERRIDE { }
- virtual void OnMediaRequestStateChanged(int renderProcessId, int renderViewId, int pageRequestId, const GURL &securityOrigin, const content::MediaStreamDevice &device
- , content::MediaRequestState state) Q_DECL_OVERRIDE;
+ virtual void OnMediaRequestStateChanged(int render_process_id, int render_frame_id, int page_request_id, const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state) Q_DECL_OVERRIDE;
virtual void OnCreatingAudioStream(int /*render_process_id*/, int /*render_frame_id*/) Q_DECL_OVERRIDE { }
- virtual void OnAudioStreamPlaying(int /*render_process_id*/, int /*render_frame_id*/, int /*stream_id*/, const ReadPowerAndClipCallback& /*power_read_callback*/) Q_DECL_OVERRIDE { }
- virtual void OnAudioStreamStopped(int /*render_process_id*/, int /*render_frame_id*/, int /*stream_id*/) Q_DECL_OVERRIDE { }
DesktopStreamsRegistry *getDesktopStreamsRegistry();
@@ -112,8 +109,7 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
void ProcessQueuedAccessRequest(content::WebContents *);
// Called by the MediaObserver() functions, executed on UI thread.
- void updateMediaRequestStateOnUIThread(int renderProcessId, int renderViewId, int pageRequestId, const content::MediaStreamDevice &
- , content::MediaRequestState);
+ void updateMediaRequestStateOnUIThread(int render_process_id, int render_frame_id, int page_request_id, const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state);
RequestsQueues m_pendingRequests;
diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp
index f14d2cb39..fce563b47 100644
--- a/src/core/network_delegate_qt.cpp
+++ b/src/core/network_delegate_qt.cpp
@@ -40,7 +40,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_request_details.h"
#include "content/public/browser/resource_request_info.h"
-#include "content/public/common/page_transition_types.h"
+#include "ui/base/page_transition_types.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request.h"
#include "type_conversion.h"
@@ -49,23 +49,23 @@
namespace {
-int pageTransitionToNavigationType(content::PageTransition transition)
+int pageTransitionToNavigationType(ui::PageTransition transition)
{
- int32 qualifier = content::PageTransitionGetQualifier(transition);
+ int32 qualifier = ui::PageTransitionGetQualifier(transition);
- if (qualifier & content::PAGE_TRANSITION_FORWARD_BACK)
+ if (qualifier & ui::PAGE_TRANSITION_FORWARD_BACK)
return WebContentsAdapterClient::BackForwardNavigation;
- content::PageTransition stippedTransition = content::PageTransitionStripQualifier(transition);
+ ui::PageTransition stippedTransition = ui::PageTransitionStripQualifier(transition);
switch (stippedTransition) {
- case content::PAGE_TRANSITION_LINK:
+ case ui::PAGE_TRANSITION_LINK:
return WebContentsAdapterClient::LinkClickedNavigation;
- case content::PAGE_TRANSITION_TYPED:
+ case ui::PAGE_TRANSITION_TYPED:
return WebContentsAdapterClient::TypedNavigation;
- case content::PAGE_TRANSITION_FORM_SUBMIT:
+ case ui::PAGE_TRANSITION_FORM_SUBMIT:
return WebContentsAdapterClient::FormSubmittedNavigation;
- case content::PAGE_TRANSITION_RELOAD:
+ case ui::PAGE_TRANSITION_RELOAD:
return WebContentsAdapterClient::ReloadNavigation;
default:
return WebContentsAdapterClient::OtherNavigation;
@@ -84,9 +84,9 @@ int NetworkDelegateQt::OnBeforeURLRequest(net::URLRequest *request, const net::C
// Abort the request if it has no associated render info / render view.
return net::ERR_ABORTED;
- ResourceType::Type resourceType = info->GetResourceType();
+ content::ResourceType resourceType = info->GetResourceType();
// Only intercept MAIN_FRAME and SUB_FRAME.
- if (!ResourceType::IsFrame(resourceType))
+ if (!content::IsResourceTypeFrame(resourceType))
return net::OK;
// Track active requests since |callback| and |new_url| are valid
@@ -97,7 +97,7 @@ int NetworkDelegateQt::OnBeforeURLRequest(net::URLRequest *request, const net::C
RequestParams params = {
toQt(request->url()),
- resourceType == ResourceType::MAIN_FRAME,
+ info->IsMainFrame(),
navigationType,
renderProcessId,
renderFrameId
diff --git a/src/core/ozone_platform_eglfs.cpp b/src/core/ozone_platform_eglfs.cpp
index b6b367aeb..8f1d9870f 100644
--- a/src/core/ozone_platform_eglfs.cpp
+++ b/src/core/ozone_platform_eglfs.cpp
@@ -36,6 +36,8 @@
#include "ozone_platform_eglfs.h"
+#if defined(USE_OZONE)
+
#include "media/ozone/media_ozone_platform.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/ozone/ozone_platform.h"
@@ -43,7 +45,6 @@
#include "ui/ozone/public/gpu_platform_support.h"
#include "ui/ozone/public/gpu_platform_support_host.h"
-#if defined(USE_OZONE)
namespace media {
diff --git a/src/core/ozone_platform_eglfs.h b/src/core/ozone_platform_eglfs.h
index 9d96688a5..a976d1c63 100644
--- a/src/core/ozone_platform_eglfs.h
+++ b/src/core/ozone_platform_eglfs.h
@@ -37,13 +37,13 @@
#ifndef UI_OZONE_PLATFORM_EGLFS_OZONE_PLATFORM_EGLFS_H_
#define UI_OZONE_PLATFORM_EGLFS_OZONE_PLATFORM_EGLFS_H_
+#if defined(USE_OZONE)
+
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/ozone/ozone_platform.h"
#include "surface_factory_qt.h"
-#if defined(USE_OZONE)
-
namespace ui {
class OzonePlatformEglfs : public OzonePlatform {
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
index 17287669f..d61e6e7fd 100644
--- a/src/core/qtwebengine.gypi
+++ b/src/core/qtwebengine.gypi
@@ -8,6 +8,7 @@
'dependencies': [
'<(chromium_src_dir)/base/base.gyp:base',
'<(chromium_src_dir)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '<(chromium_src_dir)/components/components.gyp:error_page_renderer',
'<(chromium_src_dir)/components/components.gyp:visitedlink_browser',
'<(chromium_src_dir)/components/components.gyp:visitedlink_renderer',
'<(chromium_src_dir)/content/content.gyp:content',
@@ -17,8 +18,7 @@
'<(chromium_src_dir)/content/content.gyp:content_gpu',
'<(chromium_src_dir)/content/content.gyp:content_renderer',
'<(chromium_src_dir)/content/content.gyp:content_utility',
- '<(chromium_src_dir)/content/content.gyp:content_worker',
- '<(chromium_src_dir)/content/content_resources.gyp:content_resources',
+ '<(chromium_src_dir)/content/app/resources/content_resources.gyp:content_resources',
'<(chromium_src_dir)/ipc/ipc.gyp:ipc',
'<(chromium_src_dir)/media/media.gyp:media',
'<(chromium_src_dir)/net/net.gyp:net',
diff --git a/src/core/qtwebengine_extras.gypi b/src/core/qtwebengine_extras.gypi
index f30c16401..0592df73b 100644
--- a/src/core/qtwebengine_extras.gypi
+++ b/src/core/qtwebengine_extras.gypi
@@ -15,6 +15,7 @@
['exclude', 'clipboard/clipboard_util_win\\.(cc|h)$'],
['exclude', 'dragdrop/os_exchange_data_provider_aurax11\\.(cc|h)$'],
['exclude', 'dragdrop/os_exchange_data_provider_win\\.(cc|h)$'],
+ ['exclude', 'dragdrop/os_exchange_data_provider_mac\\.(mm|h)$'],
['exclude', 'resource/resource_bundle_android.cc$'],
['exclude', 'resource/resource_bundle_auralinux.cc$'],
['exclude', 'resource/resource_bundle_gtk.cc$'],
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index a94ae6995..1e9d2bbf7 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -52,8 +52,6 @@
#include "content/browser/renderer_host/input/web_input_event_util.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/common/cursors/webcursor.h"
-#include "content/common/gpu/gpu_messages.h"
-#include "content/common/view_messages.h"
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
@@ -62,7 +60,8 @@
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
-#include "ui/events/gesture_detection/gesture_config_helper.h"
+#include "ui/events/event.h"
+#include "ui/events/gesture_detection/gesture_provider_config_helper.h"
#include "ui/events/gesture_detection/motion_event.h"
#include "ui/gfx/size_conversions.h"
@@ -80,6 +79,22 @@
#include <QWindow>
#include <QtGui/qaccessible.h>
+static inline ui::LatencyInfo CreateLatencyInfo(const blink::WebInputEvent& event) {
+ ui::LatencyInfo latency_info;
+ // The latency number should only be added if the timestamp is valid.
+ if (event.timeStampSeconds) {
+ const int64 time_micros = static_cast<int64>(
+ event.timeStampSeconds * base::Time::kMicrosecondsPerSecond);
+ latency_info.AddLatencyNumberWithTimestamp(
+ ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
+ 0,
+ 0,
+ base::TimeTicks() + base::TimeDelta::FromMicroseconds(time_micros),
+ 1);
+ }
+ return latency_info;
+}
+
static inline Qt::InputMethodHints toQtInputMethodHints(ui::TextInputType inputType)
{
switch (inputType) {
@@ -128,8 +143,6 @@ static inline ui::GestureProvider::Config QtGestureProviderConfig() {
ui::GestureProvider::Config config = ui::DefaultGestureProviderConfig();
// Causes an assert in CreateWebGestureEventFromGestureEventData and we don't need them in Qt.
config.gesture_begin_end_types_enabled = false;
- // Swipe gestures aren't forwarded, we don't use them and they abort the gesture detection.
- config.scale_gesture_detector_config.gesture_detector_config.swipe_enabled = config.gesture_detector_config.swipe_enabled = false;
return config;
}
@@ -172,12 +185,6 @@ public:
virtual ToolType GetToolType(size_t pointer_index) const Q_DECL_OVERRIDE { return ui::MotionEvent::TOOL_TYPE_UNKNOWN; }
virtual int GetButtonState() const Q_DECL_OVERRIDE { return 0; }
- virtual scoped_ptr<MotionEvent> Cancel() const Q_DECL_OVERRIDE { Q_UNREACHABLE(); return scoped_ptr<MotionEvent>(); }
-
- virtual scoped_ptr<MotionEvent> Clone() const Q_DECL_OVERRIDE {
- return scoped_ptr<MotionEvent>(new MotionEventQt(*this));
- }
-
private:
QList<QTouchEvent::TouchPoint> touchPoints;
base::TimeTicks eventTime;
@@ -263,6 +270,10 @@ void RenderWidgetHostViewQt::SetBounds(const gfx::Rect& screenRect)
SetSize(screenRect.size());
}
+gfx::Vector2dF RenderWidgetHostViewQt::GetLastScrollOffset() const {
+ return m_lastScrollOffset;
+}
+
gfx::Size RenderWidgetHostViewQt::GetPhysicalBackingSize() const
{
if (!m_delegate || !m_delegate->window() || !m_delegate->window()->screen())
@@ -369,7 +380,7 @@ void RenderWidgetHostViewQt::UnlockMouse()
void RenderWidgetHostViewQt::WasShown()
{
- m_host->WasShown();
+ m_host->WasShown(ui::LatencyInfo());
}
void RenderWidgetHostViewQt::WasHidden()
@@ -490,10 +501,13 @@ void RenderWidgetHostViewQt::SetIsLoading(bool)
// We use WebContentsDelegateQt::LoadingStateChanged to notify about loading state.
}
-void RenderWidgetHostViewQt::TextInputStateChanged(const ViewHostMsg_TextInputState_Params& params)
+void RenderWidgetHostViewQt::TextInputTypeChanged(ui::TextInputType type, ui::TextInputMode mode, bool can_compose_inline, int flags)
{
- m_currentInputType = params.type;
- m_delegate->inputMethodStateChanged(static_cast<bool>(params.type));
+ Q_UNUSED(mode);
+ Q_UNUSED(can_compose_inline);
+ Q_UNUSED(flags);
+ m_currentInputType = type;
+ m_delegate->inputMethodStateChanged(static_cast<bool>(type));
}
void RenderWidgetHostViewQt::ImeCancelComposition()
@@ -538,14 +552,12 @@ void RenderWidgetHostViewQt::SelectionBoundsChanged(const ViewHostMsg_SelectionB
m_cursorRect = QRect(caretRect.x(), caretRect.y(), caretRect.width(), caretRect.height());
}
-void RenderWidgetHostViewQt::ScrollOffsetChanged()
-{
- // Not used.
-}
-
-void RenderWidgetHostViewQt::CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& /* dst_size */, const base::Callback<void(bool, const SkBitmap&)>& callback, const SkBitmap::Config config)
+void RenderWidgetHostViewQt::CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& dst_size, content::CopyFromCompositingSurfaceCallback& callback, const SkColorType color_type)
{
NOTIMPLEMENTED();
+ Q_UNUSED(src_subrect);
+ Q_UNUSED(dst_size);
+ Q_UNUSED(color_type);
callback.Run(false, SkBitmap());
}
@@ -560,36 +572,6 @@ bool RenderWidgetHostViewQt::CanCopyToVideoFrame() const
return false;
}
-void RenderWidgetHostViewQt::AcceleratedSurfaceInitialized(int host_id, int route_id)
-{
-}
-
-void RenderWidgetHostViewQt::AcceleratedSurfaceBuffersSwapped(const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, int gpu_host_id)
-{
- AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
- ack_params.sync_point = 0;
- content::RenderWidgetHostImpl::AcknowledgeBufferPresent(params.route_id, gpu_host_id, ack_params);
- content::RenderWidgetHostImpl::CompositorFrameDrawn(params.latency_info);
-}
-
-void RenderWidgetHostViewQt::AcceleratedSurfacePostSubBuffer(const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, int gpu_host_id)
-{
- AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
- ack_params.sync_point = 0;
- content::RenderWidgetHostImpl::AcknowledgeBufferPresent(params.route_id, gpu_host_id, ack_params);
- content::RenderWidgetHostImpl::CompositorFrameDrawn(params.latency_info);
-}
-
-void RenderWidgetHostViewQt::AcceleratedSurfaceSuspend()
-{
- QT_NOT_YET_IMPLEMENTED
-}
-
-void RenderWidgetHostViewQt::AcceleratedSurfaceRelease()
-{
- QT_NOT_YET_IMPLEMENTED
-}
-
bool RenderWidgetHostViewQt::HasAcceleratedSurface(const gfx::Size&)
{
return false;
@@ -597,6 +579,7 @@ bool RenderWidgetHostViewQt::HasAcceleratedSurface(const gfx::Size&)
void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame)
{
+ m_lastScrollOffset = frame->metadata.root_scroll_offset;
Q_ASSERT(!m_needsDelegatedFrameAck);
m_needsDelegatedFrameAck = true;
m_pendingOutputSurfaceId = output_surface_id;
@@ -640,7 +623,7 @@ gfx::Rect RenderWidgetHostViewQt::GetBoundsInRootWindow()
gfx::GLSurfaceHandle RenderWidgetHostViewQt::GetCompositingSurface()
{
- return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT);
+ return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT);
}
void RenderWidgetHostViewQt::SelectionChanged(const base::string16 &text, size_t offset, const gfx::Range &range)
@@ -650,9 +633,7 @@ void RenderWidgetHostViewQt::SelectionChanged(const base::string16 &text, size_t
#if defined(USE_X11)
// Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
- ui::ScopedClipboardWriter clipboard_writer(
- ui::Clipboard::GetForCurrentThread(),
- ui::CLIPBOARD_TYPE_SELECTION);
+ ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION);
clipboard_writer.WriteText(text);
#endif
}
@@ -792,8 +773,8 @@ void RenderWidgetHostViewQt::processMotionEvent(const ui::MotionEvent &motionEve
m_gestureProvider.OnTouchEventAck(eventConsumed);
return;
}
-
- m_host->ForwardTouchEvent(content::CreateWebTouchEventFromMotionEvent(motionEvent));
+ blink::WebTouchEvent touchEvent = content::CreateWebTouchEventFromMotionEvent(motionEvent);
+ m_host->ForwardTouchEventWithLatencyInfo(touchEvent, CreateLatencyInfo(touchEvent));
}
QList<QTouchEvent::TouchPoint> RenderWidgetHostViewQt::mapTouchPointIds(const QList<QTouchEvent::TouchPoint> &inputPoints)
@@ -887,10 +868,12 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
QTextCharFormat textCharFormat = attribute.value.value<QTextFormat>().toCharFormat();
QColor qcolor = textCharFormat.underlineColor();
+ QColor qBackgroundColor = textCharFormat.background().color();
blink::WebColor color = SkColorSetARGB(qcolor.alpha(), qcolor.red(), qcolor.green(), qcolor.blue());
+ blink::WebColor backgroundColor = SkColorSetARGB(qBackgroundColor.alpha(), qBackgroundColor.red(), qBackgroundColor.green(), qBackgroundColor.blue());
int start = qMin(attribute.start, (attribute.start + attribute.length));
int end = qMax(attribute.start, (attribute.start + attribute.length));
- underlines.push_back(blink::WebCompositionUnderline(start, end, color, false));
+ underlines.push_back(blink::WebCompositionUnderline(start, end, color, false, backgroundColor));
break;
}
case QInputMethodEvent::Cursor:
@@ -934,15 +917,14 @@ void RenderWidgetHostViewQt::AccessibilityDoDefaultAction(int acc_obj_id)
return;
m_host->AccessibilityDoDefaultAction(acc_obj_id);
}
-
-void RenderWidgetHostViewQt::AccessibilityScrollToMakeVisible(int acc_obj_id, gfx::Rect subfocus)
+void RenderWidgetHostViewQt::AccessibilityScrollToMakeVisible(int acc_obj_id, const gfx::Rect& subfocus)
{
if (!m_host)
return;
m_host->AccessibilityScrollToMakeVisible(acc_obj_id, subfocus);
}
-void RenderWidgetHostViewQt::AccessibilityScrollToPoint(int acc_obj_id, gfx::Point point)
+void RenderWidgetHostViewQt::AccessibilityScrollToPoint(int acc_obj_id, const gfx::Point& point)
{
if (!m_host)
return;
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 6ba95213b..40fe72adc 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -44,6 +44,8 @@
#include "cc/resources/transferable_resource.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/common/gpu/gpu_messages.h"
+#include "content/common/view_messages.h"
#include "ui/events/gesture_detection/filtered_gesture_provider.h"
#include <QMap>
#include <QPoint>
@@ -108,6 +110,7 @@ public:
virtual content::RenderWidgetHost* GetRenderWidgetHost() const Q_DECL_OVERRIDE;
virtual void SetSize(const gfx::Size& size) Q_DECL_OVERRIDE;
virtual void SetBounds(const gfx::Rect&) Q_DECL_OVERRIDE;
+ virtual gfx::Vector2dF GetLastScrollOffset() const Q_DECL_OVERRIDE;
virtual gfx::Size GetPhysicalBackingSize() const Q_DECL_OVERRIDE;
virtual gfx::NativeView GetNativeView() const Q_DECL_OVERRIDE;
virtual gfx::NativeViewId GetNativeViewId() const Q_DECL_OVERRIDE;
@@ -127,22 +130,16 @@ public:
virtual void Blur() Q_DECL_OVERRIDE;
virtual void UpdateCursor(const content::WebCursor&) Q_DECL_OVERRIDE;
virtual void SetIsLoading(bool) Q_DECL_OVERRIDE;
- virtual void TextInputStateChanged(const ViewHostMsg_TextInputState_Params& params) Q_DECL_OVERRIDE;
+ virtual void TextInputTypeChanged(ui::TextInputType type, ui::TextInputMode mode, bool can_compose_inline, int flags) Q_DECL_OVERRIDE;
virtual void ImeCancelComposition() Q_DECL_OVERRIDE;
virtual void ImeCompositionRangeChanged(const gfx::Range&, const std::vector<gfx::Rect>&) Q_DECL_OVERRIDE;
virtual void RenderProcessGone(base::TerminationStatus, int) Q_DECL_OVERRIDE;
virtual void Destroy() Q_DECL_OVERRIDE;
virtual void SetTooltipText(const base::string16 &tooltip_text) Q_DECL_OVERRIDE;
virtual void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params&) Q_DECL_OVERRIDE;
- virtual void ScrollOffsetChanged() Q_DECL_OVERRIDE;
- virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& /* dst_size */, const base::Callback<void(bool, const SkBitmap&)>& callback, const SkBitmap::Config config) Q_DECL_OVERRIDE;
+ virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& dst_size, content::CopyFromCompositingSurfaceCallback& callback, const SkColorType color_type) Q_DECL_OVERRIDE;
virtual void CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr<media::VideoFrame>& target, const base::Callback<void(bool)>& callback) Q_DECL_OVERRIDE;
virtual bool CanCopyToVideoFrame() const Q_DECL_OVERRIDE;
- virtual void AcceleratedSurfaceInitialized(int host_id, int route_id) Q_DECL_OVERRIDE;
- virtual void AcceleratedSurfaceBuffersSwapped(const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, int gpu_host_id) Q_DECL_OVERRIDE;
- virtual void AcceleratedSurfacePostSubBuffer(const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, int gpu_host_id) Q_DECL_OVERRIDE;
- virtual void AcceleratedSurfaceSuspend() Q_DECL_OVERRIDE;
- virtual void AcceleratedSurfaceRelease() Q_DECL_OVERRIDE;
virtual bool HasAcceleratedSurface(const gfx::Size&) Q_DECL_OVERRIDE;
virtual void OnSwapCompositorFrame(uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) Q_DECL_OVERRIDE;
virtual void GetScreenInfo(blink::WebScreenInfo* results) Q_DECL_OVERRIDE;
@@ -173,7 +170,6 @@ public:
void handleInputMethodEvent(QInputMethodEvent*);
#if defined(OS_MACOSX)
- virtual void SetTakesFocusOnlyOnMouseDown(bool flag) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
virtual void SetActive(bool active) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
virtual bool IsSpeaking() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void SpeakSelection() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
@@ -204,9 +200,9 @@ public:
// Overridden from content::BrowserAccessibilityDelegate
virtual void AccessibilitySetFocus(int acc_obj_id) Q_DECL_OVERRIDE;
virtual void AccessibilityDoDefaultAction(int acc_obj_id) Q_DECL_OVERRIDE;
- virtual void AccessibilityShowMenu(int acc_obj_id) Q_DECL_OVERRIDE { }
- virtual void AccessibilityScrollToMakeVisible(int acc_obj_id, gfx::Rect subfocus) Q_DECL_OVERRIDE;
- virtual void AccessibilityScrollToPoint(int acc_obj_id, gfx::Point point) Q_DECL_OVERRIDE;
+ virtual void AccessibilityShowMenu(const gfx::Point& point) Q_DECL_OVERRIDE { }
+ virtual void AccessibilityScrollToMakeVisible(int acc_obj_id, const gfx::Rect& subfocus) Q_DECL_OVERRIDE;
+ virtual void AccessibilityScrollToPoint(int acc_obj_id, const gfx::Point& point) Q_DECL_OVERRIDE;
virtual void AccessibilitySetTextSelection(int acc_obj_id, int start_offset, int end_offset) Q_DECL_OVERRIDE;
virtual bool AccessibilityViewHasFocus() const Q_DECL_OVERRIDE;
virtual gfx::Rect AccessibilityGetViewBounds() const Q_DECL_OVERRIDE { return GetViewBounds(); }
@@ -251,6 +247,8 @@ private:
QPoint m_lockedMousePosition;
bool m_initPending;
+
+ gfx::Vector2dF m_lastScrollOffset;
};
#endif // RENDER_WIDGET_HOST_VIEW_QT_H
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index bfc5c389f..a13a7999c 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -38,6 +38,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/localized_error.h"
+#include "components/error_page/common/error_page_params.h"
#include "components/visitedlink/renderer/visitedlink_slave.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
@@ -47,7 +48,7 @@
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/webui/jstemplate_builder.h"
-#include "webkit/common/webpreferences.h"
+#include "content/public/common/web_preferences.h"
#include "renderer/qt_render_view_observer.h"
@@ -107,7 +108,7 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* ren
// NetErrorHelper::GetErrorStringsForDnsProbe, but that one is harder to untangle.
LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost
, error.staleCopyInCache && !isPost, locale, renderView->GetAcceptLanguages()
- , scoped_ptr<LocalizedError::ErrorPageParams>(), &errorStrings);
+ , scoped_ptr<error_page::ErrorPageParams>(), &errorStrings);
resourceId = IDR_NET_ERROR_HTML;
diff --git a/src/core/resource_context_qt.h b/src/core/resource_context_qt.h
index 490ef1789..e3f0292e7 100644
--- a/src/core/resource_context_qt.h
+++ b/src/core/resource_context_qt.h
@@ -60,9 +60,6 @@ public:
virtual net::URLRequestContext* GetRequestContext() Q_DECL_OVERRIDE;
- virtual bool AllowMicAccess(const GURL& origin) Q_DECL_OVERRIDE { return false; }
- virtual bool AllowCameraAccess(const GURL& origin) Q_DECL_OVERRIDE { return false; }
-
void set_url_request_context_getter(net::URLRequestContextGetter* getter);
private:
diff --git a/src/core/resources/repack_resources.gypi b/src/core/resources/repack_resources.gypi
index 133813c60..b5d8c9d91 100644
--- a/src/core/resources/repack_resources.gypi
+++ b/src/core/resources/repack_resources.gypi
@@ -8,10 +8,10 @@
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
- '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
- '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak',
],
},
diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp
index 835a87cdf..5d4d83c05 100644
--- a/src/core/resources/resources.gyp
+++ b/src/core/resources/resources.gyp
@@ -14,8 +14,8 @@
'qt_install_translations%': '',
},
'dependencies': [
- '<(chromium_src_dir)/webkit/webkit_resources.gyp:webkit_strings',
- '<(chromium_src_dir)/webkit/webkit_resources.gyp:webkit_resources',
+ '<(chromium_src_dir)/content/app/strings/content_strings.gyp:content_strings',
+ '<(chromium_src_dir)/webkit/blink_resources.gyp:blink_resources',
'<(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
'../chrome_qt.gyp:chrome_resources',
],
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 5d32ef470..d1f5aef5a 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -51,8 +51,8 @@
#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_impl.h"
#include "net/proxy/proxy_service.h"
-#include "net/ssl/default_server_bound_cert_store.h"
-#include "net/ssl/server_bound_cert_service.h"
+#include "net/ssl/channel_id_service.h"
+#include "net/ssl/default_channel_id_store.h"
#include "net/ssl/ssl_config_service_defaults.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h"
@@ -106,8 +106,8 @@ void URLRequestContextGetterQt::updateStorageSettings()
// must synchronously run on the glib message loop. This will be passed to
// the URLRequestContextStorage on the IO thread in GetURLRequestContext().
m_proxyConfigService.reset(net::ProxyService::CreateSystemProxyConfigService(
- BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)->message_loop_proxy(),
- BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE))
+ content::BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ content::BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))
);
}
if (m_storage && !m_updateStorageSettings) {
@@ -127,8 +127,8 @@ void URLRequestContextGetterQt::generateStorage()
generateCookieStore();
generateUserAgent();
- m_storage->set_server_bound_cert_service(new net::ServerBoundCertService(
- new net::DefaultServerBoundCertStore(NULL),
+ m_storage->set_channel_id_service(new net::ChannelIDService(
+ new net::DefaultChannelIDStore(NULL),
base::WorkerPool::GetTaskRunner(true)));
m_storage->set_cert_verifier(net::CertVerifier::CreateDefault());
@@ -250,7 +250,7 @@ void URLRequestContextGetterQt::generateHttpCache()
net::HttpNetworkSession::Params network_session_params;
network_session_params.transport_security_state = m_urlRequestContext->transport_security_state();
network_session_params.cert_verifier = m_urlRequestContext->cert_verifier();
- network_session_params.server_bound_cert_service = m_urlRequestContext->server_bound_cert_service();
+ network_session_params.channel_id_service = m_urlRequestContext->channel_id_service();
network_session_params.proxy_service = m_urlRequestContext->proxy_service();
network_session_params.ssl_config_service = m_urlRequestContext->ssl_config_service();
network_session_params.http_auth_handler_factory = m_urlRequestContext->http_auth_handler_factory();
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 9398046d0..00f4bdbbe 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -66,9 +66,9 @@
#include "content/public/common/page_zoom.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/url_constants.h"
+#include "content/public/common/web_preferences.h"
#include "ui/shell_dialogs/selected_file_info.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
-#include "webkit/common/webpreferences.h"
#include <QDir>
#include <QGuiApplication>
@@ -274,7 +274,7 @@ static void deserializeNavigationHistory(QDataStream &input, int *currentIndex,
content::Referrer(toGurl(referrerUrl), static_cast<blink::WebReferrerPolicy>(referrerPolicy)),
// Use a transition type of reload so that we don't incorrectly
// increase the typed count.
- content::PAGE_TRANSITION_RELOAD,
+ ui::PAGE_TRANSITION_RELOAD,
false,
// The extra headers are not sync'ed across sessions.
std::string(),
@@ -463,7 +463,7 @@ void WebContentsAdapter::load(const QUrl &url)
Q_D(WebContentsAdapter);
content::NavigationController::LoadURLParams params(toGurl(url));
- params.transition_type = content::PageTransitionFromInt(content::PAGE_TRANSITION_TYPED | content::PAGE_TRANSITION_FROM_ADDRESS_BAR);
+ params.transition_type = ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
d->webContents->GetController().LoadURLWithParams(params);
d->webContents->Focus();
}
@@ -746,7 +746,7 @@ void WebContentsAdapter::stopFinding()
d->webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION);
}
-void WebContentsAdapter::updateWebPreferences(const WebPreferences & webPreferences)
+void WebContentsAdapter::updateWebPreferences(const content::WebPreferences & webPreferences)
{
Q_D(WebContentsAdapter);
d->webContents->GetRenderViewHost()->UpdateWebkitPreferences(webPreferences);
@@ -773,7 +773,7 @@ void WebContentsAdapter::grantMediaAccessPermission(const QUrl &securityOrigin,
void WebContentsAdapter::runGeolocationRequestCallback(const QUrl &securityOrigin, bool allowed)
{
Q_D(WebContentsAdapter);
- d->webContentsDelegate->m_lastGeolocationRequestCallbacks.first.Run(allowed);
+ d->webContentsDelegate->m_lastGeolocationRequestCallback.Run(allowed);
}
void WebContentsAdapter::grantMouseLockPermission(bool granted)
@@ -809,5 +809,5 @@ void WebContentsAdapter::filesSelectedInChooser(const QStringList &fileList, Web
if (mode == WebContentsAdapterClient::UploadFolder && !fileList.isEmpty()
&& QFileInfo(fileList.first()).isDir()) // Enumerate the directory
files = listRecursively(QDir(fileList.first()));
- rvh->FilesSelectedInChooser(toVector<ui::SelectedFileInfo>(files), static_cast<content::FileChooserParams::Mode>(mode));
+ rvh->FilesSelectedInChooser(toVector<content::FileChooserFileInfo>(files), static_cast<content::FileChooserParams::Mode>(mode));
}
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index 432380be2..6dc8c2193 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -47,10 +47,10 @@
namespace content {
class WebContents;
+struct WebPreferences;
}
class BrowserContextQt;
class WebContentsAdapterPrivate;
-struct WebPreferences;
QT_FORWARD_DECLARE_CLASS(QAccessibleInterface);
@@ -104,7 +104,7 @@ public:
quint64 fetchDocumentInnerText();
quint64 findText(const QString &subString, bool caseSensitively, bool findBackward);
void stopFinding();
- void updateWebPreferences(const WebPreferences &webPreferences);
+ void updateWebPreferences(const content::WebPreferences &webPreferences);
void wasShown();
void wasHidden();
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index d64584c47..92b61dcdd 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -53,12 +53,13 @@
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/favicon_url.h"
#include "content/public/common/file_chooser_params.h"
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/url_constants.h"
-#include "webkit/common/webpreferences.h"
+#include "content/public/common/web_preferences.h"
// Maps the LogSeverity defines in base/logging.h to the web engines message levels.
static WebContentsAdapterClient::JavaScriptConsoleMessageLevel mapToJavascriptConsoleMessageLevel(int32 messageLevel) {
@@ -102,7 +103,7 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents
return target;
}
-void WebContentsDelegateQt::NavigationStateChanged(const content::WebContents* source, unsigned changed_flags)
+void WebContentsDelegateQt::NavigationStateChanged(const content::WebContents* source, content::InvalidateTypes changed_flags)
{
if (changed_flags & content::INVALIDATE_TYPE_URL)
m_viewClient->urlChanged(toQt(source->GetVisibleURL()));
@@ -130,21 +131,21 @@ void WebContentsDelegateQt::LoadProgressChanged(content::WebContents* source, do
m_viewClient->loadProgressChanged(qRound(progress * 100));
}
-void WebContentsDelegateQt::DidStartProvisionalLoadForFrame(int64 frame_id, int64 parent_frame_id, bool is_main_frame, const GURL &validated_url, bool isErrorPage, bool, content::RenderViewHost*)
+void WebContentsDelegateQt::DidStartProvisionalLoadForFrame(content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc)
{
- if (isErrorPage) {
- m_loadingErrorFrameList.append(frame_id);
+ if (is_error_page) {
+ m_loadingErrorFrameList.append(render_frame_host->GetRoutingID());
return;
}
- if (!is_main_frame)
+ if (render_frame_host->GetParent())
return;
m_loadingErrorFrameList.clear();
m_viewClient->loadStarted(toQt(validated_url));
}
-void WebContentsDelegateQt::DidCommitProvisionalLoadForFrame(int64 frame_id, const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, content::PageTransition transition_type, content::RenderViewHost* render_view_host)
+void WebContentsDelegateQt::DidCommitProvisionalLoadForFrame(content::RenderFrameHost* render_frame_host, const GURL& url, ui::PageTransition transition_type)
{
// Make sure that we don't set the findNext WebFindOptions on a new frame.
m_lastSearchedString = QString();
@@ -153,32 +154,32 @@ void WebContentsDelegateQt::DidCommitProvisionalLoadForFrame(int64 frame_id, con
m_viewClient->loadCommitted();
}
-void WebContentsDelegateQt::DidFailProvisionalLoad(int64 frame_id, const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, const base::string16& error_description, content::RenderViewHost* render_view_host)
+void WebContentsDelegateQt::DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, const base::string16& error_description)
{
- DidFailLoad(frame_id, validated_url, is_main_frame, error_code, error_description, render_view_host);
+ DidFailLoad(render_frame_host, validated_url, error_code, error_description);
}
-void WebContentsDelegateQt::DidFailLoad(int64 frame_id, const GURL &validated_url, bool is_main_frame, int error_code, const base::string16 &error_description, content::RenderViewHost *rvh)
+void WebContentsDelegateQt::DidFailLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, const base::string16& error_description)
{
- if (m_loadingErrorFrameList.removeOne(frame_id) || !is_main_frame)
+ if (m_loadingErrorFrameList.removeOne(render_frame_host->GetRoutingID()) || render_frame_host->GetParent())
return;
m_viewClient->loadFinished(false, toQt(validated_url), error_code, toQt(error_description));
m_viewClient->loadProgressChanged(0);
}
-void WebContentsDelegateQt::DidFinishLoad(int64 frame_id, const GURL &url, bool is_main_frame, content::RenderViewHost*)
+void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url)
{
- if (m_loadingErrorFrameList.removeOne(frame_id)) {
- Q_ASSERT(url.is_valid() && url.spec() == content::kUnreachableWebDataURL);
+ if (m_loadingErrorFrameList.removeOne(render_frame_host->GetRoutingID())) {
+ Q_ASSERT(validated_url.is_valid() && validated_url.spec() == content::kUnreachableWebDataURL);
m_viewClient->iconChanged(QUrl());
return;
}
- if (!is_main_frame)
+ if (render_frame_host->GetParent())
return;
- m_viewClient->loadFinished(true, toQt(url));
+ m_viewClient->loadFinished(true, toQt(validated_url));
content::NavigationEntry *entry = web_contents()->GetController().GetActiveEntry();
if (!entry)
@@ -260,14 +261,13 @@ void WebContentsDelegateQt::RequestMediaAccessPermission(content::WebContents *w
MediaCaptureDevicesDispatcher::GetInstance()->processMediaAccessRequest(m_viewClient, web_contents, request, callback);
}
-void WebContentsDelegateQt::UpdateTargetURL(content::WebContents *source, int32 page_id, const GURL &url)
+void WebContentsDelegateQt::UpdateTargetURL(content::WebContents* source, const GURL& url)
{
Q_UNUSED(source)
- Q_UNUSED(page_id)
m_viewClient->didUpdateTargetURL(toQt(url));
}
-void WebContentsDelegateQt::DidNavigateAnyFrame(const content::LoadCommittedDetails &, const content::FrameNavigateParams &params)
+void WebContentsDelegateQt::DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params)
{
// VisistedLinksMaster asserts !IsOffTheRecord().
if (!params.should_update_history || !m_viewClient->browserContextAdapter()->trackVisitedLinks())
@@ -285,7 +285,7 @@ void WebContentsDelegateQt::RequestToLockMouse(content::WebContents *web_content
m_viewClient->runMouseLockPermissionRequest(toQt(web_contents->GetVisibleURL()));
}
-void WebContentsDelegateQt::overrideWebPreferences(content::WebContents *, WebPreferences *webPreferences)
+void WebContentsDelegateQt::overrideWebPreferences(content::WebContents *, content::WebPreferences *webPreferences)
{
m_viewClient->webEngineSettings()->overrideWebPreferences(webPreferences);
}
@@ -312,8 +312,8 @@ void WebContentsDelegateQt::allowCertificateError(const QExplicitlySharedDataPoi
m_viewClient->allowCertificateError(errorController);
}
-void WebContentsDelegateQt::requestGeolocationPermission(const GURL &requestingFrameOrigin, base::Callback<void (bool)> resultCallback, base::Closure *cancelCallback)
+void WebContentsDelegateQt::requestGeolocationPermission(const GURL &requestingFrameOrigin, base::Callback<void (bool)> resultCallback)
{
- m_lastGeolocationRequestCallbacks = qMakePair(resultCallback, cancelCallback);
+ m_lastGeolocationRequestCallback = resultCallback;
m_viewClient->runGeolocationPermissionRequest(toQt(requestingFrameOrigin));
}
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index aa97b52cc..2a541a768 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -51,9 +51,9 @@ namespace content {
class RenderViewHost;
class JavaScriptDialogManager;
class WebContents;
+ struct WebPreferences;
}
-struct WebPreferences;
class WebContentsAdapterClient;
class CertificateErrorController;
@@ -68,15 +68,15 @@ public:
int lastReceivedFindReply() const { return m_lastReceivedFindReply; }
virtual content::WebContents *OpenURLFromTab(content::WebContents *source, const content::OpenURLParams &params) Q_DECL_OVERRIDE;
- virtual void NavigationStateChanged(const content::WebContents* source, unsigned changed_flags) Q_DECL_OVERRIDE;
+ virtual void NavigationStateChanged(const content::WebContents* source, content::InvalidateTypes changed_flags) Q_DECL_OVERRIDE;
virtual void AddNewContents(content::WebContents* source, content::WebContents* new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture, bool* was_blocked) Q_DECL_OVERRIDE;
virtual void CloseContents(content::WebContents *source) Q_DECL_OVERRIDE;
virtual void LoadProgressChanged(content::WebContents* source, double progress) Q_DECL_OVERRIDE;
- virtual void DidStartProvisionalLoadForFrame(int64 frame_id, int64 parent_frame_id, bool is_main_frame, const GURL &validated_url, bool is_error_page, bool is_iframe_srcdoc, content::RenderViewHost *render_view_host) Q_DECL_OVERRIDE;
- virtual void DidCommitProvisionalLoadForFrame(int64 frame_id, const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, content::PageTransition transition_type, content::RenderViewHost* render_view_host) Q_DECL_OVERRIDE;
- virtual void DidFailProvisionalLoad(int64 frame_id, const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, const base::string16& error_description, content::RenderViewHost* render_view_host) Q_DECL_OVERRIDE;
- virtual void DidFailLoad(int64 frame_id, const GURL &validated_url, bool is_main_frame, int error_code, const base::string16 &error_description, content::RenderViewHost *render_view_host) Q_DECL_OVERRIDE;
- virtual void DidFinishLoad(int64 frame_id, const GURL &validated_url, bool is_main_frame, content::RenderViewHost *render_view_host) Q_DECL_OVERRIDE;
+ virtual void DidStartProvisionalLoadForFrame(content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc) Q_DECL_OVERRIDE;
+ virtual void DidCommitProvisionalLoadForFrame(content::RenderFrameHost* render_frame_host, const GURL& url, ui::PageTransition transition_type) Q_DECL_OVERRIDE;
+ virtual void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, const base::string16& error_description) Q_DECL_OVERRIDE;
+ virtual void DidFailLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, const base::string16& error_description) Q_DECL_OVERRIDE;
+ virtual void DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url) Q_DECL_OVERRIDE;
virtual void DidUpdateFaviconURL(const std::vector<content::FaviconURL>& candidates) Q_DECL_OVERRIDE;
virtual content::JavaScriptDialogManager *GetJavaScriptDialogManager() Q_DECL_OVERRIDE;
virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents, bool enter_fullscreen) Q_DECL_OVERRIDE;
@@ -85,15 +85,15 @@ public:
virtual bool AddMessageToConsole(content::WebContents* source, int32 level, const base::string16& message, int32 line_no, const base::string16& source_id) Q_DECL_OVERRIDE;
virtual void FindReply(content::WebContents *source, int request_id, int number_of_matches, const gfx::Rect& selection_rect, int active_match_ordinal, bool final_update) Q_DECL_OVERRIDE;
virtual void RequestMediaAccessPermission(content::WebContents* web_contents, const content::MediaStreamRequest& request, const content::MediaResponseCallback& callback) Q_DECL_OVERRIDE;
- virtual void UpdateTargetURL(content::WebContents *source, int32 page_id, const GURL &url) Q_DECL_OVERRIDE;
- virtual void DidNavigateAnyFrame(const content::LoadCommittedDetails&, const content::FrameNavigateParams& params) Q_DECL_OVERRIDE;
+ virtual void UpdateTargetURL(content::WebContents* source, const GURL& url) Q_DECL_OVERRIDE;
+ virtual void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) Q_DECL_OVERRIDE;
virtual void RequestToLockMouse(content::WebContents *web_contents, bool user_gesture, bool last_unlocked_by_target) Q_DECL_OVERRIDE;
- void overrideWebPreferences(content::WebContents *, WebPreferences*);
+ void overrideWebPreferences(content::WebContents *, content::WebPreferences*);
void allowCertificateError(const QExplicitlySharedDataPointer<CertificateErrorController> &) ;
- void requestGeolocationPermission(const GURL &requestingFrameOrigin, base::Callback<void (bool)> resultCallback, base::Closure *cancelCallback);
+ void requestGeolocationPermission(const GURL &requestingFrameOrigin, base::Callback<void (bool)> resultCallback);
- QPair<base::Callback<void (bool)>, base::Closure*> m_lastGeolocationRequestCallbacks;
+ base::Callback<void (bool)> m_lastGeolocationRequestCallback;
private:
WebContentsAdapter *createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture);
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index 5909ee510..af5b6dd19 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -54,7 +54,7 @@ void WebContentsViewQt::initialize(WebContentsAdapterClient* client)
static_cast<RenderWidgetHostViewQt *>(m_webContents->GetRenderWidgetHostView())->setAdapterClient(client);
}
-content::RenderWidgetHostViewBase* WebContentsViewQt::CreateViewForWidget(content::RenderWidgetHost* render_widget_host)
+content::RenderWidgetHostViewBase* WebContentsViewQt::CreateViewForWidget(content::RenderWidgetHost* render_widget_host, bool is_guest_view_hack)
{
RenderWidgetHostViewQt *view = new RenderWidgetHostViewQt(render_widget_host);
diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h
index d433718a7..5e8ff0f96 100644
--- a/src/core/web_contents_view_qt.h
+++ b/src/core/web_contents_view_qt.h
@@ -59,12 +59,13 @@ public:
: m_webContents(webContents)
, m_client(0)
, m_factoryClient(0)
+ , m_allowOtherViews(false)
{ }
void initialize(WebContentsAdapterClient* client);
WebContentsAdapterClient *client() { return m_client; }
- virtual content::RenderWidgetHostViewBase *CreateViewForWidget(content::RenderWidgetHost* render_widget_host) Q_DECL_OVERRIDE;
+ virtual content::RenderWidgetHostViewBase *CreateViewForWidget(content::RenderWidgetHost* render_widget_host, bool is_guest_view_hack) Q_DECL_OVERRIDE;
virtual void CreateView(const gfx::Size& initial_size, gfx::NativeView context) Q_DECL_OVERRIDE;
@@ -100,9 +101,6 @@ public:
virtual gfx::Rect GetViewBounds() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED return gfx::Rect(); }
- virtual void ShowPopupMenu(const gfx::Rect& bounds, int item_height, double item_font_size, int selected_item,
- const std::vector<content::MenuItem>& items, bool right_aligned, bool allow_multiple_selection) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
-
virtual void StartDragging(const content::DropData& drop_data, blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const content::DragEventSourceInfo& event_info) Q_DECL_OVERRIDE;
virtual void ShowContextMenu(content::RenderFrameHost *, const content::ContextMenuParams &params) Q_DECL_OVERRIDE;
@@ -110,9 +108,9 @@ public:
virtual void TakeFocus(bool reverse) Q_DECL_OVERRIDE;
#if defined(OS_MACOSX)
- virtual void SetAllowOverlappingViews(bool overlapping) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
+ virtual void SetAllowOtherViews(bool allow) Q_DECL_OVERRIDE { m_allowOtherViews = allow; }
+ virtual bool GetAllowOtherViews() const Q_DECL_OVERRIDE { return m_allowOtherViews; }
virtual void CloseTabAfterEventTracking() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual bool GetAllowOverlappingViews() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual bool IsEventTracking() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void SetOverlayView(WebContentsView* overlay, const gfx::Point& offset) { QT_NOT_YET_IMPLEMENTED }
virtual void RemoveOverlayView() { QT_NOT_YET_IMPLEMENTED }
@@ -122,6 +120,7 @@ private:
content::WebContents *m_webContents;
WebContentsAdapterClient *m_client;
WebContentsAdapterClient *m_factoryClient;
+ bool m_allowOtherViews;
};
#endif // WEB_CONTENTS_VIEW_QT_H
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 85c1136d9..dadf9f36b 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -144,7 +144,7 @@ WebEngineContext::~WebEngineContext()
scoped_refptr<WebEngineContext> WebEngineContext::current()
{
- if (!sContext) {
+ if (!sContext.get()) {
sContext = new WebEngineContext();
// Make sure that we ramp down Chromium before QApplication destroys its X connection, etc.
qAddPostRoutine(destroyContext);
@@ -192,7 +192,6 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kEnableDelegatedRenderer);
parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing);
parsedCommandLine->AppendSwitch(switches::kInProcessGPU);
- parsedCommandLine->AppendSwitch(switches::kDisableDesktopNotifications);
#if defined(OS_WIN)
parsedCommandLine->AppendSwitch(switches::kDisableD3D11);
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 452eee306..110c9ae6a 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -38,7 +38,7 @@
#include "web_engine_library_info.h"
#include "base/base_paths.h"
-#include "base/file_util.h"
+#include "base/files/file_util.h"
#include "content/public/common/content_paths.h"
#include "ui/base/ui_base_paths.h"
#include "type_conversion.h"
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 9b070d3b2..b46775934 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -38,7 +38,7 @@
#include "web_contents_adapter.h"
#include "type_conversion.h"
-#include "webkit/common/webpreferences.h"
+#include "content/public/common/web_preferences.h"
#include <QFont>
#include <QTimer>
@@ -97,7 +97,7 @@ WebEngineSettings::~WebEngineSettings()
{
}
-void WebEngineSettings::overrideWebPreferences(WebPreferences *prefs)
+void WebEngineSettings::overrideWebPreferences(content::WebPreferences *prefs)
{
// Apply our settings on top of those.
applySettingsToWebPreferences(prefs);
@@ -105,7 +105,7 @@ void WebEngineSettings::overrideWebPreferences(WebPreferences *prefs)
// as the host process already overides some of the default WebPreferences values
// before we get here (e.g. number_of_cpu_cores).
if (webPreferences.isNull())
- webPreferences.reset(new WebPreferences(*prefs));
+ webPreferences.reset(new content::WebPreferences(*prefs));
}
void WebEngineSettings::setAttribute(WebEngineSettings::Attribute attr, bool on)
@@ -258,7 +258,7 @@ void WebEngineSettings::doApply()
m_adapter->updateWebPreferences(*webPreferences.data());
}
-void WebEngineSettings::applySettingsToWebPreferences(WebPreferences *prefs)
+void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *prefs)
{
// Override for now
prefs->java_enabled = false;
@@ -280,14 +280,14 @@ void WebEngineSettings::applySettingsToWebPreferences(WebPreferences *prefs)
prefs->enable_error_page = testAttribute(ErrorPageEnabled);
// Fonts settings.
- prefs->standard_font_family_map[webkit_glue::kCommonScript] = toString16(fontFamily(StandardFont));
- prefs->fixed_font_family_map[webkit_glue::kCommonScript] = toString16(fontFamily(FixedFont));
- prefs->serif_font_family_map[webkit_glue::kCommonScript] = toString16(fontFamily(SerifFont));
- prefs->sans_serif_font_family_map[webkit_glue::kCommonScript] = toString16(fontFamily(SansSerifFont));
- prefs->cursive_font_family_map[webkit_glue::kCommonScript] = toString16(fontFamily(CursiveFont));
- prefs->fantasy_font_family_map[webkit_glue::kCommonScript] = toString16(fontFamily(FantasyFont));
+ prefs->standard_font_family_map[content::kCommonScript] = toString16(fontFamily(StandardFont));
+ prefs->fixed_font_family_map[content::kCommonScript] = toString16(fontFamily(FixedFont));
+ prefs->serif_font_family_map[content::kCommonScript] = toString16(fontFamily(SerifFont));
+ prefs->sans_serif_font_family_map[content::kCommonScript] = toString16(fontFamily(SansSerifFont));
+ prefs->cursive_font_family_map[content::kCommonScript] = toString16(fontFamily(CursiveFont));
+ prefs->fantasy_font_family_map[content::kCommonScript] = toString16(fontFamily(FantasyFont));
// FIXME: add pictograph?
- // prefs.pictograph_font_family_map[webkit_glue::kCommonScript] = toString16(fontFamily());
+ // prefs.pictograph_font_family_map[content::kCommonScript] = toString16(fontFamily());
prefs->default_font_size = fontSize(DefaultFontSize);
prefs->default_fixed_font_size = fontSize(DefaultFixedFontSize);
prefs->minimum_font_size = fontSize(MinimumFontSize);
diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h
index c098f8ef4..42dff4b3c 100644
--- a/src/core/web_engine_settings.h
+++ b/src/core/web_engine_settings.h
@@ -47,7 +47,10 @@
class BatchTimer;
class WebContentsAdapter;
class WebEngineSettings;
+
+namespace content {
struct WebPreferences;
+}
class QWEBENGINE_EXPORT WebEngineSettingsDelegate {
public:
@@ -98,7 +101,7 @@ public:
WebEngineSettings(WebEngineSettingsDelegate*);
virtual ~WebEngineSettings();
- void overrideWebPreferences(WebPreferences *prefs);
+ void overrideWebPreferences(content::WebPreferences *prefs);
void setAttribute(Attribute, bool on);
bool testAttribute(Attribute) const;
@@ -120,7 +123,7 @@ public:
private:
void doApply();
- void applySettingsToWebPreferences(WebPreferences *);
+ void applySettingsToWebPreferences(content::WebPreferences *);
void setWebContentsAdapter(WebContentsAdapter *adapter) { m_adapter = adapter; }
WebContentsAdapter* m_adapter;
@@ -129,7 +132,7 @@ private:
QHash<FontFamily, QString> m_fontFamilies;
QHash<FontSize, int> m_fontSizes;
QString m_defaultEncoding;
- QScopedPointer<WebPreferences> webPreferences;
+ QScopedPointer<content::WebPreferences> webPreferences;
QScopedPointer<BatchTimer> m_batchTimer;
friend class BatchTimer;