summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-07-15 13:16:24 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-09-14 08:15:28 +0000
commitbaaab31631dcff6075418c95f0220e8fb207dd50 (patch)
treeeea3e8e723f0b142965d7c13ce23d061e73d3cc8
parente462c0919113b7aae0a24fc438bce648c9fbcfc2 (diff)
Adaptations to Chromium 52
Change-Id: Idf8a511ba26d263fd9d014d87d5e1101d706da71 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r--src/core/access_token_store_qt.cpp3
-rw-r--r--src/core/browser_accessibility_manager_qt.cpp5
-rw-r--r--src/core/browser_accessibility_manager_qt.h15
-rw-r--r--src/core/browser_context_qt.cpp16
-rw-r--r--src/core/browser_context_qt.h19
-rw-r--r--src/core/chromium_overrides.cpp8
-rw-r--r--src/core/content_browser_client_qt.cpp18
-rw-r--r--src/core/content_browser_client_qt.h4
-rw-r--r--src/core/content_main_delegate_qt.h3
-rw-r--r--src/core/delegated_frame_node.cpp25
-rw-r--r--src/core/delegated_frame_node.h5
-rw-r--r--src/core/desktop_screen_qt.cpp31
-rw-r--r--src/core/desktop_screen_qt.h20
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.cpp10
-rw-r--r--src/core/gl_surface_qt.cpp1
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp62
-rw-r--r--src/core/media_capture_devices_dispatcher.h8
-rw-r--r--src/core/ozone_platform_eglfs.cpp11
-rw-r--r--src/core/ozone_platform_eglfs.h22
-rw-r--r--src/core/print_view_manager_base_qt.cpp5
-rw-r--r--src/core/print_view_manager_base_qt.h2
-rw-r--r--src/core/print_view_manager_qt.cpp6
-rw-r--r--src/core/printing_message_filter_qt.cpp2
-rw-r--r--src/core/proxy_config_service_qt.cpp2
-rw-r--r--src/core/proxy_config_service_qt.h5
-rw-r--r--src/core/qtwebengine.gypi2
-rw-r--r--src/core/render_widget_host_view_qt.cpp9
-rw-r--r--src/core/render_widget_host_view_qt.h8
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp173
-rw-r--r--src/core/renderer/content_renderer_client_qt.h6
-rw-r--r--src/core/renderer/render_frame_observer_qt.cpp6
-rw-r--r--src/core/renderer/render_view_observer_qt.cpp10
-rw-r--r--src/core/renderer/render_view_observer_qt.h6
-rw-r--r--src/core/renderer/user_resource_controller.h4
-rw-r--r--src/core/resource_bundle_qt.cpp4
-rw-r--r--src/core/resource_context_qt.cpp3
-rw-r--r--src/core/resource_dispatcher_host_delegate_qt.cpp2
-rw-r--r--src/core/type_conversion.h2
-rw-r--r--src/core/url_request_context_getter_qt.cpp39
-rw-r--r--src/core/url_request_context_getter_qt.h3
-rw-r--r--src/core/web_contents_adapter.cpp12
-rw-r--r--src/core/web_contents_adapter_p.h9
-rw-r--r--src/core/web_engine_context.h13
-rw-r--r--src/core/web_engine_visited_links_manager.cpp1
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp2
-rw-r--r--tools/scripts/version_resolver.py6
46 files changed, 338 insertions, 290 deletions
diff --git a/src/core/access_token_store_qt.cpp b/src/core/access_token_store_qt.cpp
index 853170d5..5b8fe83f 100644
--- a/src/core/access_token_store_qt.cpp
+++ b/src/core/access_token_store_qt.cpp
@@ -47,6 +47,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
#include "browser_context_qt.h"
#include "browser_context_adapter.h"
@@ -76,7 +77,7 @@ void AccessTokenStoreQt::LoadAccessTokens(const LoadAccessTokensCallback& callba
void AccessTokenStoreQt::performWorkOnUIThread()
{
- m_systemRequestContext = WebEngineContext::current()->defaultBrowserContext()->browserContext()->GetRequestContext();
+ m_systemRequestContext = content::BrowserContext::GetDefaultStoragePartition(WebEngineContext::current()->defaultBrowserContext()->browserContext())->GetURLRequestContext();
}
void AccessTokenStoreQt::respondOnOriginatingThread(const LoadAccessTokensCallback& callback)
diff --git a/src/core/browser_accessibility_manager_qt.cpp b/src/core/browser_accessibility_manager_qt.cpp
index bd3c5e7d..730786bb 100644
--- a/src/core/browser_accessibility_manager_qt.cpp
+++ b/src/core/browser_accessibility_manager_qt.cpp
@@ -82,8 +82,9 @@ QAccessibleInterface *BrowserAccessibilityManagerQt::rootParentAccessible()
return QAccessible::queryAccessibleInterface(m_parentObject);
}
-void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(ui::AXEvent event_type,
- BrowserAccessibility* node)
+void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(BrowserAccessibilityEvent::Source source,
+ ui::AXEvent event_type,
+ BrowserAccessibility* node)
{
BrowserAccessibilityQt *iface = static_cast<BrowserAccessibilityQt*>(node);
diff --git a/src/core/browser_accessibility_manager_qt.h b/src/core/browser_accessibility_manager_qt.h
index 4ff9fb69..da50de9c 100644
--- a/src/core/browser_accessibility_manager_qt.h
+++ b/src/core/browser_accessibility_manager_qt.h
@@ -59,15 +59,14 @@ public:
class BrowserAccessibilityManagerQt : public BrowserAccessibilityManager
{
public:
- BrowserAccessibilityManagerQt(
- QObject* parentObject,
- const ui::AXTreeUpdate& initialTree,
- BrowserAccessibilityDelegate* delegate,
- BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactoryQt());
+ BrowserAccessibilityManagerQt(QObject* parentObject,
+ const ui::AXTreeUpdate& initialTree,
+ BrowserAccessibilityDelegate* delegate,
+ BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactoryQt());
- void NotifyAccessibilityEvent(
- ui::AXEvent event_type,
- BrowserAccessibility* node) Q_DECL_OVERRIDE;
+ void NotifyAccessibilityEvent(BrowserAccessibilityEvent::Source source,
+ ui::AXEvent event_type,
+ BrowserAccessibility* node) Q_DECL_OVERRIDE;
QAccessibleInterface *rootParentAccessible();
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index 42993207..bc5341f4 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -117,19 +117,15 @@ net::URLRequestContextGetter *BrowserContextQt::GetRequestContext()
return url_request_getter_.get();
}
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContext()
+net::URLRequestContextGetter *BrowserContextQt::CreateMediaRequestContext()
{
- return GetRequestContext();
-}
-
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContextForRenderProcess(int)
-{
- return GetRequestContext();
+ return url_request_getter_.get();
}
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContextForStoragePartition(const base::FilePath&, bool)
+net::URLRequestContextGetter *BrowserContextQt::CreateMediaRequestContextForStoragePartition(const base::FilePath&, bool)
{
- return GetRequestContext();
+ Q_UNIMPLEMENTED();
+ return nullptr;
}
content::ResourceContext *BrowserContextQt::GetResourceContext()
@@ -167,7 +163,7 @@ content::SSLHostStateDelegate* BrowserContextQt::GetSSLHostStateDelegate()
return sslHostStateDelegate.get();
}
-scoped_ptr<content::ZoomLevelDelegate> BrowserContextQt::CreateZoomLevelDelegate(const base::FilePath&)
+std::unique_ptr<content::ZoomLevelDelegate> BrowserContextQt::CreateZoomLevelDelegate(const base::FilePath&)
{
return nullptr;
}
diff --git a/src/core/browser_context_qt.h b/src/core/browser_context_qt.h
index 982f9a76..dcd2da74 100644
--- a/src/core/browser_context_qt.h
+++ b/src/core/browser_context_qt.h
@@ -71,10 +71,11 @@ public:
base::FilePath GetCachePath() const;
virtual bool IsOffTheRecord() const Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetRequestContext() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContext() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContextForRenderProcess(int) Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContextForStoragePartition(const base::FilePath&, bool) Q_DECL_OVERRIDE;
+ net::URLRequestContextGetter *GetRequestContext() Q_DECL_DEPRECATED;
+
+ virtual net::URLRequestContextGetter *CreateMediaRequestContext() Q_DECL_OVERRIDE;
+ virtual net::URLRequestContextGetter *CreateMediaRequestContextForStoragePartition(const base::FilePath& partition_path, bool in_memory) Q_DECL_OVERRIDE;
+
virtual content::ResourceContext *GetResourceContext() Q_DECL_OVERRIDE;
virtual content::DownloadManagerDelegate *GetDownloadManagerDelegate() Q_DECL_OVERRIDE;
virtual content::BrowserPluginGuestManager* GetGuestManager() Q_DECL_OVERRIDE;
@@ -88,7 +89,7 @@ public:
const base::FilePath& partition_path, bool in_memory,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) Q_DECL_OVERRIDE;
- virtual scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE;
+ virtual std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE;
virtual content::PermissionManager *GetPermissionManager() Q_DECL_OVERRIDE;
virtual content::BackgroundSyncController* GetBackgroundSyncController() Q_DECL_OVERRIDE;
@@ -105,13 +106,13 @@ public:
private:
friend class ContentBrowserClientQt;
friend class WebContentsAdapter;
- scoped_ptr<content::ResourceContext> resourceContext;
+ std::unique_ptr<content::ResourceContext> resourceContext;
scoped_refptr<URLRequestContextGetterQt> url_request_getter_;
- scoped_ptr<PermissionManagerQt> permissionManager;
- scoped_ptr<SSLHostStateDelegateQt> sslHostStateDelegate;
+ std::unique_ptr<PermissionManagerQt> permissionManager;
+ std::unique_ptr<SSLHostStateDelegateQt> sslHostStateDelegate;
BrowserContextAdapter *m_adapter;
scoped_refptr<TestingPrefStore> m_prefStore;
- scoped_ptr<PrefService> m_prefService;
+ std::unique_ptr<PrefService> m_prefService;
friend class BrowserContextAdapter;
DISALLOW_COPY_AND_ASSIGN(BrowserContextQt);
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index 18596c33..882f5b1d 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -119,9 +119,9 @@ void RenderWidgetHostViewBase::GetDefaultScreenInfo(blink::WebScreenInfo* result
namespace content {
// content/common/font_list.h
-scoped_ptr<base::ListValue> GetFontList_SlowBlocking()
+std::unique_ptr<base::ListValue> GetFontList_SlowBlocking()
{
- scoped_ptr<base::ListValue> font_list(new base::ListValue);
+ std::unique_ptr<base::ListValue> font_list(new base::ListValue);
QFontDatabase database;
for (auto family : database.families()){
@@ -166,9 +166,9 @@ namespace net {
class SSLPrivateKey { };
class X509Certificate;
-scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey(X509Certificate* certificate)
+std::unique_ptr<SSLPrivateKey> FetchClientCertPrivateKey(X509Certificate* certificate)
{
- return scoped_ptr<SSLPrivateKey>();
+ return std::unique_ptr<SSLPrivateKey>();
}
} // namespace net
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 0c3acd37..62754479 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -39,6 +39,7 @@
#include "content_browser_client_qt.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_restrictions.h"
#if defined(ENABLE_SPELLCHECK)
@@ -58,7 +59,7 @@
#include "content/public/common/main_function_params.h"
#include "content/public/common/url_constants.h"
#include "ui/base/ui_base_switches.h"
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_share_group.h"
@@ -216,9 +217,9 @@ private:
base::TimeTicks m_timerScheduledTime;
};
-scoped_ptr<base::MessagePump> messagePumpFactory()
+std::unique_ptr<base::MessagePump> messagePumpFactory()
{
- return scoped_ptr<base::MessagePump>(new MessagePumpForUIQt);
+ return base::WrapUnique(new MessagePumpForUIQt);
}
} // namespace
@@ -250,7 +251,7 @@ public:
{
base::ThreadRestrictions::SetIOAllowed(true);
// Like ChromeBrowserMainExtraPartsViews::PreCreateThreads does.
- gfx::Screen::SetScreenInstance(new DesktopScreenQt);
+ display::Screen::SetScreenInstance(new DesktopScreenQt);
return 0;
}
@@ -479,10 +480,11 @@ void ContentBrowserClientQt::GetAdditionalMappedFilesForChildProcess(const base:
#endif
#if defined(ENABLE_PLUGINS)
- void ContentBrowserClientQt::DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) {
- browser_host->GetPpapiHost()->AddHostFactoryFilter(
- scoped_ptr<ppapi::host::HostFactory>(new QtWebEngineCore::PepperHostFactoryQt(browser_host)));
- }
+void ContentBrowserClientQt::DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host)
+{
+ browser_host->GetPpapiHost()->AddHostFactoryFilter(
+ base::WrapUnique(new QtWebEngineCore::PepperHostFactoryQt(browser_host)));
+}
#endif
content::DevToolsManagerDelegate* ContentBrowserClientQt::GetDevToolsManagerDelegate()
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 09863147..d7b962b6 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -41,9 +41,7 @@
#define CONTENT_BROWSER_CLIENT_QT_H
#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/modules/notifications/WebNotificationPermission.h"
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
@@ -119,7 +117,7 @@ public:
private:
BrowserMainPartsQt* m_browserMainParts;
- scoped_ptr<ResourceDispatcherHostDelegateQt> m_resourceDispatcherHostDelegate;
+ std::unique_ptr<ResourceDispatcherHostDelegateQt> m_resourceDispatcherHostDelegate;
scoped_refptr<ShareGroupQtQuick> m_shareGroupQtQuick;
};
diff --git a/src/core/content_main_delegate_qt.h b/src/core/content_main_delegate_qt.h
index dd7f38f6..3cb3b3bb 100644
--- a/src/core/content_main_delegate_qt.h
+++ b/src/core/content_main_delegate_qt.h
@@ -42,7 +42,6 @@
#include "content/public/app/content_main_delegate.h"
-#include "base/memory/scoped_ptr.h"
#include <QtCore/qcompilerdetection.h>
#include "content_browser_client_qt.h"
@@ -63,7 +62,7 @@ public:
bool BasicStartupComplete(int* /*exit_code*/) Q_DECL_OVERRIDE;
private:
- scoped_ptr<ContentBrowserClientQt> m_browserClient;
+ std::unique_ptr<ContentBrowserClientQt> m_browserClient;
};
} // namespace QtWebEngineCore
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index dd0fd877..11d56c33 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -59,7 +59,6 @@
#include "cc/output/delegated_frame_data.h"
#include "cc/quads/debug_border_draw_quad.h"
#include "cc/quads/draw_quad.h"
-#include "cc/quads/io_surface_draw_quad.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/stream_video_draw_quad.h"
@@ -354,7 +353,7 @@ QSharedPointer<QSGTexture> ResourceHolder::initTexture(bool quadNeedsBlending, R
if (!texture) {
if (m_resource.is_software) {
Q_ASSERT(apiDelegate);
- scoped_ptr<cc::SharedBitmap> sharedBitmap = content::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox);
+ std::unique_ptr<cc::SharedBitmap> sharedBitmap = content::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox);
// QSG interprets QImage::hasAlphaChannel meaning that a node should enable blending
// to draw it but Chromium keeps this information in the quads.
// The input format is currently always Format_ARGB32_Premultiplied, so assume that all
@@ -634,8 +633,9 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
videoNode->setRect(toQt(quad->rect));
currentLayerChain->appendChildNode(videoNode);
break;
+ }
#ifdef GL_OES_EGL_image_external
- } case cc::DrawQuad::STREAM_VIDEO_CONTENT: {
+ case cc::DrawQuad::STREAM_VIDEO_CONTENT: {
const cc::StreamVideoDrawQuad *squad = cc::StreamVideoDrawQuad::MaterialCast(quad);
ResourceHolder *resource = findAndHoldResource(squad->resource_id(), resourceCandidates);
MailboxTexture *texture = static_cast<MailboxTexture *>(initAndHoldTexture(resource, quad->ShouldDrawWithBlending()));
@@ -646,23 +646,10 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
svideoNode->setTextureMatrix(toQt(squad->matrix.matrix()));
currentLayerChain->appendChildNode(svideoNode);
break;
-#endif
- }
- case cc::DrawQuad::IO_SURFACE_CONTENT: {
- const cc::IOSurfaceDrawQuad *ioquad = cc::IOSurfaceDrawQuad::MaterialCast(quad);
- ResourceHolder *resource = findAndHoldResource(ioquad->io_surface_resource_id(), resourceCandidates);
- MailboxTexture *texture = static_cast<MailboxTexture *>(initAndHoldTexture(resource, quad->ShouldDrawWithBlending()));
- texture->setTarget(GL_TEXTURE_RECTANGLE);
-
- bool flip = ioquad->orientation != cc::IOSurfaceDrawQuad::FLIPPED;
- StreamVideoNode *svideoNode = new StreamVideoNode(texture, flip, RectangleTarget);
- QMatrix4x4 matrix;
- matrix.scale(ioquad->io_surface_size.width(), ioquad->io_surface_size.height());
- svideoNode->setRect(toQt(ioquad->rect));
- svideoNode->setTextureMatrix(matrix);
- currentLayerChain->appendChildNode(svideoNode);
- break;
}
+#endif
+ case cc::DrawQuad::SURFACE_CONTENT:
+ Q_UNREACHABLE();
default:
qWarning("Unimplemented quad material: %d", quad->material);
}
diff --git a/src/core/delegated_frame_node.h b/src/core/delegated_frame_node.h
index 8a37f6b4..d2713801 100644
--- a/src/core/delegated_frame_node.h
+++ b/src/core/delegated_frame_node.h
@@ -40,7 +40,6 @@
#ifndef DELEGATED_FRAME_NODE_H
#define DELEGATED_FRAME_NODE_H
-#include "base/memory/scoped_ptr.h"
#include "cc/quads/render_pass.h"
#include "cc/resources/transferable_resource.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
@@ -73,7 +72,7 @@ class ChromiumCompositorData : public QSharedData {
public:
ChromiumCompositorData() : frameDevicePixelRatio(1) { }
QHash<unsigned, QSharedPointer<ResourceHolder> > resourceHolders;
- scoped_ptr<cc::DelegatedFrameData> frameData;
+ std::unique_ptr<cc::DelegatedFrameData> frameData;
qreal frameDevicePixelRatio;
};
@@ -104,7 +103,7 @@ private:
QWaitCondition m_mailboxesFetchedWaitCond;
QMutex m_mutex;
QList<gfx::TransferableFence> m_textureFences;
- scoped_ptr<gpu::SyncPointClient> m_syncPointClient;
+ std::unique_ptr<gpu::SyncPointClient> m_syncPointClient;
};
} // namespace QtWebEngineCore
diff --git a/src/core/desktop_screen_qt.cpp b/src/core/desktop_screen_qt.cpp
index 0904aec5..f18a27ed 100644
--- a/src/core/desktop_screen_qt.cpp
+++ b/src/core/desktop_screen_qt.cpp
@@ -39,6 +39,9 @@
#include "desktop_screen_qt.h"
+#include "ui/display/display.h"
+#include "ui/gfx/geometry/point.h"
+
namespace QtWebEngineCore {
gfx::Point DesktopScreenQt::GetCursorScreenPoint()
@@ -47,10 +50,10 @@ gfx::Point DesktopScreenQt::GetCursorScreenPoint()
return gfx::Point();
}
-gfx::NativeWindow DesktopScreenQt::GetWindowUnderCursor()
+bool DesktopScreenQt::IsWindowUnderCursor(gfx::NativeWindow)
{
Q_UNREACHABLE();
- return gfx::NativeWindow();
+ return false;
}
gfx::NativeWindow DesktopScreenQt::GetWindowAtScreenPoint(const gfx::Point& point)
@@ -65,42 +68,42 @@ int DesktopScreenQt::GetNumDisplays() const
return 0;
}
-std::vector<gfx::Display> DesktopScreenQt::GetAllDisplays() const
+std::vector<display::Display> DesktopScreenQt::GetAllDisplays() const
{
Q_UNREACHABLE();
- return std::vector<gfx::Display>();
+ return std::vector<display::Display>();
}
-gfx::Display DesktopScreenQt::GetDisplayNearestWindow(gfx::NativeView window) const
+display::Display DesktopScreenQt::GetDisplayNearestWindow(gfx::NativeView window) const
{
// RenderViewHostImpl::OnStartDragging uses this to determine
// the scale factor for the view.
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetDisplayNearestPoint(const gfx::Point& point) const
+display::Display DesktopScreenQt::GetDisplayNearestPoint(const gfx::Point& point) const
{
Q_UNREACHABLE();
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetDisplayMatching(const gfx::Rect& match_rect) const
+display::Display DesktopScreenQt::GetDisplayMatching(const gfx::Rect& match_rect) const
{
Q_UNREACHABLE();
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetPrimaryDisplay() const
+display::Display DesktopScreenQt::GetPrimaryDisplay() const
{
- return gfx::Display();
+ return display::Display();
}
-void DesktopScreenQt::AddObserver(gfx::DisplayObserver* observer)
+void DesktopScreenQt::AddObserver(display::DisplayObserver* observer)
{
Q_UNREACHABLE();
}
-void DesktopScreenQt::RemoveObserver(gfx::DisplayObserver* observer)
+void DesktopScreenQt::RemoveObserver(display::DisplayObserver* observer)
{
Q_UNREACHABLE();
}
diff --git a/src/core/desktop_screen_qt.h b/src/core/desktop_screen_qt.h
index ec7fe2e3..0e7588ae 100644
--- a/src/core/desktop_screen_qt.h
+++ b/src/core/desktop_screen_qt.h
@@ -40,26 +40,26 @@
#ifndef DESKTOP_SCREEN_QT_H
#define DESKTOP_SCREEN_QT_H
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
#include <QtGlobal>
namespace QtWebEngineCore {
-class DesktopScreenQt : public gfx::Screen {
+class DesktopScreenQt : public display::Screen {
public:
// Overridden from gfx::Screen:
virtual gfx::Point GetCursorScreenPoint() Q_DECL_OVERRIDE;
- virtual gfx::NativeWindow GetWindowUnderCursor() Q_DECL_OVERRIDE;
+ virtual bool IsWindowUnderCursor(gfx::NativeWindow) Q_DECL_OVERRIDE;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) Q_DECL_OVERRIDE;
virtual int GetNumDisplays() const Q_DECL_OVERRIDE;
- virtual std::vector<gfx::Display> GetAllDisplays() const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayNearestWindow(gfx::NativeView window) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetPrimaryDisplay() const Q_DECL_OVERRIDE;
- virtual void AddObserver(gfx::DisplayObserver* observer) Q_DECL_OVERRIDE;
- virtual void RemoveObserver(gfx::DisplayObserver* observer) Q_DECL_OVERRIDE;
+ virtual std::vector<display::Display> GetAllDisplays() const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayNearestWindow(gfx::NativeView window) const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayNearestPoint(const gfx::Point& point) const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayMatching(const gfx::Rect& match_rect) const Q_DECL_OVERRIDE;
+ virtual display::Display GetPrimaryDisplay() const Q_DECL_OVERRIDE;
+ virtual void AddObserver(display::DisplayObserver* observer) Q_DECL_OVERRIDE;
+ virtual void RemoveObserver(display::DisplayObserver* observer) Q_DECL_OVERRIDE;
};
} // namespace QtWebEngineCore
diff --git a/src/core/dev_tools_http_handler_delegate_qt.cpp b/src/core/dev_tools_http_handler_delegate_qt.cpp
index 0e127d41..5fd35ee2 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.cpp
+++ b/src/core/dev_tools_http_handler_delegate_qt.cpp
@@ -86,10 +86,10 @@ public:
: m_address(address), m_port(port), m_backlog(backlog)
{}
private:
- scoped_ptr<net::ServerSocket> CreateForHttpServer() override {
- scoped_ptr<net::ServerSocket> socket(new net::TCPServerSocket(nullptr, net::NetLog::Source()));
+ std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
+ std::unique_ptr<net::ServerSocket> socket(new net::TCPServerSocket(nullptr, net::NetLog::Source()));
if (socket->ListenWithAddressAndPort(m_address, m_port, m_backlog) != net::OK)
- return scoped_ptr<net::ServerSocket>();
+ return std::unique_ptr<net::ServerSocket>();
return socket;
}
@@ -186,10 +186,10 @@ std::unique_ptr<DevToolsHttpHandler> createDevToolsHttpHandler()
delete delegate;
return nullptr;
}
- scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> factory(new TCPServerSocketFactory(delegate->bindAddress().toStdString(), delegate->port(), 1));
+ std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> factory(new TCPServerSocketFactory(delegate->bindAddress().toStdString(), delegate->port(), 1));
// Ownership of the delegate is taken over the devtools http handler.
std::unique_ptr<DevToolsHttpHandler> handler(new DevToolsHttpHandler(std::move(factory), std::string(), delegate, base::FilePath(), base::FilePath(), std::string(), std::string()));
- DevToolsDiscoveryManager::GetInstance()->AddProvider(scoped_ptr<DevToolsDiscoveryManager::Provider>(new DevToolsDiscoveryProviderQt()));
+ DevToolsDiscoveryManager::GetInstance()->AddProvider(base::WrapUnique(new DevToolsDiscoveryProviderQt()));
return std::move(handler);
}
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
index 3982b9bd..027d3dd4 100644
--- a/src/core/gl_surface_qt.cpp
+++ b/src/core/gl_surface_qt.cpp
@@ -50,7 +50,6 @@
#include "qtwebenginecoreglobal_p.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "gpu/ipc/service/image_transport_surface.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_context.h"
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index b38e90c6..3e260587 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -60,6 +60,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/origin_util.h"
#include "content/public/common/media_stream_request.h"
+#include "media/audio/audio_device_description.h"
#include "media/audio/audio_manager_base.h"
#include "ui/base/l10n/l10n_util.h"
@@ -89,27 +90,34 @@ base::string16 getContentsUrl(content::WebContents *webContents)
}
// Based on chrome/browser/media/desktop_capture_access_handler.cc:
-scoped_ptr<content::MediaStreamUI> getDevicesForDesktopCapture(content::MediaStreamDevices &devices, content::DesktopMediaID mediaId
+std::unique_ptr<content::MediaStreamUI> getDevicesForDesktopCapture(content::MediaStreamDevices *devices, content::DesktopMediaID mediaId
, bool captureAudio, bool /*display_notification*/, base::string16 /*application_title*/)
{
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- scoped_ptr<content::MediaStreamUI> ui;
-
- // Add selected desktop source to the list.
- devices.push_back(content::MediaStreamDevice(
- content::MEDIA_DESKTOP_VIDEO_CAPTURE, mediaId.ToString(), "Screen"));
- if (captureAudio) {
- devices.push_back(content::MediaStreamDevice(
- content::MEDIA_DESKTOP_AUDIO_CAPTURE,
- media::AudioManagerBase::kLoopbackInputDeviceId, "System Audio"));
- }
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ std::unique_ptr<content::MediaStreamUI> ui;
+
+ // Add selected desktop source to the list.
+ devices->push_back(content::MediaStreamDevice(content::MEDIA_DESKTOP_VIDEO_CAPTURE, mediaId.ToString(), "Screen"));
+ if (captureAudio) {
+ if (mediaId.type == content::DesktopMediaID::TYPE_WEB_CONTENTS) {
+ devices->push_back(
+ content::MediaStreamDevice(content::MEDIA_DESKTOP_AUDIO_CAPTURE,
+ mediaId.ToString(), "Tab audio"));
+ } else {
+ // Use the special loopback device ID for system audio capture.
+ devices->push_back(content::MediaStreamDevice(
+ content::MEDIA_DESKTOP_AUDIO_CAPTURE,
+ media::AudioDeviceDescription::kLoopbackInputDeviceId,
+ "System Audio"));
+ }
+ }
- return std::move(ui);
+ return std::move(ui);
}
WebContentsAdapterClient::MediaRequestFlags mediaRequestFlagsForRequest(const content::MediaStreamRequest &request)
{
- WebContentsAdapterClient::MediaRequestFlags requestFlags;
+ WebContentsAdapterClient::MediaRequestFlags requestFlags = WebContentsAdapterClient::MediaNone;
if (request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE)
requestFlags |= WebContentsAdapterClient::MediaAudioCapture;
if (request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE)
@@ -188,7 +196,7 @@ void MediaCaptureDevicesDispatcher::handleMediaAccessPermissionResponse(content:
BrowserThread::UI, FROM_HERE, base::Bind(&MediaCaptureDevicesDispatcher::ProcessQueuedAccessRequest, base::Unretained(this), webContents));
}
- callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, scoped_ptr<content::MediaStreamUI>());
+ callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::unique_ptr<content::MediaStreamUI>());
}
@@ -248,7 +256,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
, const content::MediaResponseCallback &callback)
{
content::MediaStreamDevices devices;
- scoped_ptr<content::MediaStreamUI> ui;
+ std::unique_ptr<content::MediaStreamUI> ui;
if (request.video_type != content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui));
@@ -289,8 +297,8 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
request.audio_type == content::MEDIA_DESKTOP_AUDIO_CAPTURE);
ui = getDevicesForDesktopCapture(
- devices, mediaId, capture_audio, true,
- getContentsUrl(webContents));
+ &devices, mediaId, capture_audio, true,
+ getContentsUrl(webContents));
callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::move(ui));
}
@@ -317,16 +325,16 @@ void MediaCaptureDevicesDispatcher::processScreenCaptureAccessRequest(content::W
JavaScriptDialogManagerQt::GetInstance()->runDialogForContents(webContents, WebContentsAdapterClient::InternalAuthorizationDialog, message
, QString(), securityOrigin, dialogCallback, title);
} else
- callback.Run(content::MediaStreamDevices(), content::MEDIA_DEVICE_INVALID_STATE, scoped_ptr<content::MediaStreamUI>());
+ callback.Run(content::MediaStreamDevices(), content::MEDIA_DEVICE_INVALID_STATE, std::unique_ptr<content::MediaStreamUI>());
}
void MediaCaptureDevicesDispatcher::handleScreenCaptureAccessRequest(content::WebContents *webContents, bool userAccepted, const base::string16 &)
{
content::MediaStreamDevices devices;
- scoped_ptr<content::MediaStreamUI> ui;
+ std::unique_ptr<content::MediaStreamUI> ui;
if (userAccepted) {
content::DesktopMediaID screenId = content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 0);
- ui = getDevicesForDesktopCapture(devices, screenId, false/*capture_audio*/, false/*display_notification*/, getContentsUrl(webContents));
+ ui = getDevicesForDesktopCapture(&devices, screenId, false/*capture_audio*/, false/*display_notification*/, getContentsUrl(webContents));
}
std::map<content::WebContents*, RequestsQueue>::iterator it =
m_pendingRequests.find(webContents);
@@ -417,13 +425,19 @@ void MediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(int render_proces
page_request_id, security_origin, stream_type, 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)
+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)
{
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
// 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 (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
+ if (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE || stream_type == content::MEDIA_TAB_VIDEO_CAPTURE) {
if (state == content::MEDIA_REQUEST_STATE_DONE) {
DesktopCaptureSession session = { render_process_id, render_frame_id,
page_request_id };
diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h
index b13a9da2..b21d40b8 100644
--- a/src/core/media_capture_devices_dispatcher.h
+++ b/src/core/media_capture_devices_dispatcher.h
@@ -49,7 +49,6 @@
#include "web_contents_adapter_client.h"
#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "content/public/browser/media_observer.h"
@@ -83,6 +82,11 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
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 OnSetCapturingLinkSecured(int /*render_process_id*/,
+ int /*render_frame_id*/,
+ int /*page_request_id*/,
+ content::MediaStreamType /*stream_type*/,
+ bool /*is_secure*/) Q_DECL_OVERRIDE { }
DesktopStreamsRegistry *getDesktopStreamsRegistry();
@@ -118,7 +122,7 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
RequestsQueues m_pendingRequests;
- scoped_ptr<DesktopStreamsRegistry> m_desktopStreamsRegistry;
+ std::unique_ptr<DesktopStreamsRegistry> m_desktopStreamsRegistry;
content::NotificationRegistrar m_notificationsRegistrar;
diff --git a/src/core/ozone_platform_eglfs.cpp b/src/core/ozone_platform_eglfs.cpp
index 91848d67..0b560da6 100644
--- a/src/core/ozone_platform_eglfs.cpp
+++ b/src/core/ozone_platform_eglfs.cpp
@@ -42,6 +42,7 @@
#if defined(USE_OZONE)
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/ozone/events_ozone.h"
@@ -147,11 +148,11 @@ GpuPlatformSupportHost* OzonePlatformEglfs::GetGpuPlatformSupportHost() {
return gpu_platform_support_host_.get();
}
-scoped_ptr<PlatformWindow> OzonePlatformEglfs::CreatePlatformWindow(
+std::unique_ptr<PlatformWindow> OzonePlatformEglfs::CreatePlatformWindow(
PlatformWindowDelegate* delegate,
const gfx::Rect& bounds)
{
- return make_scoped_ptr<PlatformWindow>(
+ return base::WrapUnique(
new EglfsWindow(delegate,
event_factory_ozone_.get(),
bounds));
@@ -161,7 +162,7 @@ ui::InputController* OzonePlatformEglfs::GetInputController() {
return input_controller_.get();
}
-scoped_ptr<ui::SystemInputInjector> OzonePlatformEglfs::CreateSystemInputInjector() {
+std::unique_ptr<ui::SystemInputInjector> OzonePlatformEglfs::CreateSystemInputInjector() {
return nullptr; // no input injection support.
}
@@ -169,9 +170,9 @@ ui::OverlayManagerOzone* OzonePlatformEglfs::GetOverlayManager() {
return overlay_manager_.get();
}
-scoped_ptr<ui::NativeDisplayDelegate> OzonePlatformEglfs::CreateNativeDisplayDelegate()
+std::unique_ptr<ui::NativeDisplayDelegate> OzonePlatformEglfs::CreateNativeDisplayDelegate()
{
- return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
+ return base::WrapUnique(new NativeDisplayDelegateOzone());
}
OzonePlatform* CreateOzonePlatformEglfs() { return new OzonePlatformEglfs; }
diff --git a/src/core/ozone_platform_eglfs.h b/src/core/ozone_platform_eglfs.h
index 2ab2298c..cdc2bd1c 100644
--- a/src/core/ozone_platform_eglfs.h
+++ b/src/core/ozone_platform_eglfs.h
@@ -61,27 +61,27 @@ class OzonePlatformEglfs : public OzonePlatform {
virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() override;
virtual GpuPlatformSupport* GetGpuPlatformSupport() override;
virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override;
- virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
+ virtual std::unique_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
const gfx::Rect& bounds) override;
- virtual scoped_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() override;
+ virtual std::unique_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() override;
virtual ui::InputController* GetInputController() override;
- virtual scoped_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override;
+ virtual std::unique_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override;
virtual ui::OverlayManagerOzone* GetOverlayManager() override;
private:
virtual void InitializeUI() override;
virtual void InitializeGPU() override;
- scoped_ptr<DeviceManager> device_manager_;
+ std::unique_ptr<DeviceManager> device_manager_;
- scoped_ptr<QtWebEngineCore::SurfaceFactoryQt> surface_factory_ozone_;
- scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
- scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
+ std::unique_ptr<QtWebEngineCore::SurfaceFactoryQt> surface_factory_ozone_;
+ std::unique_ptr<CursorFactoryOzone> cursor_factory_ozone_;
+ std::unique_ptr<EventFactoryEvdev> event_factory_ozone_;
- scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
- scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
- scoped_ptr<InputController> input_controller_;
- scoped_ptr<OverlayManagerOzone> overlay_manager_;
+ std::unique_ptr<GpuPlatformSupport> gpu_platform_support_;
+ std::unique_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
+ std::unique_ptr<InputController> input_controller_;
+ std::unique_ptr<OverlayManagerOzone> overlay_manager_;
DISALLOW_COPY_AND_ASSIGN(OzonePlatformEglfs);
};
diff --git a/src/core/print_view_manager_base_qt.cpp b/src/core/print_view_manager_base_qt.cpp
index 3e12901b..15150ddd 100644
--- a/src/core/print_view_manager_base_qt.cpp
+++ b/src/core/print_view_manager_base_qt.cpp
@@ -45,7 +45,6 @@
#include "web_engine_context.h"
#include "base/single_thread_task_runner.h"
-#include "base/thread_task_runner_handle.h"
#include "base/timer/timer.h"
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -246,7 +245,7 @@ void PrintViewManagerBaseQt::OnDidPrintPage(
#endif
// Only used when |metafile_must_be_valid| is true.
- scoped_ptr<base::SharedMemory> shared_buf;
+ std::unique_ptr<base::SharedMemory> shared_buf;
if (metafile_must_be_valid) {
if (!base::SharedMemory::IsHandleValid(params.metafile_data_handle)) {
NOTREACHED() << "invalid memory handle";
@@ -268,7 +267,7 @@ void PrintViewManagerBaseQt::OnDidPrintPage(
}
}
- scoped_ptr<printing::PdfMetafileSkia> metafile(new printing::PdfMetafileSkia);
+ std::unique_ptr<printing::PdfMetafileSkia> metafile(new printing::PdfMetafileSkia);
if (metafile_must_be_valid) {
if (!metafile->InitFromData(shared_buf->memory(), params.data_size)) {
NOTREACHED() << "Invalid metafile header";
diff --git a/src/core/print_view_manager_base_qt.h b/src/core/print_view_manager_base_qt.h
index 5939a2b4..a8b4b5fc 100644
--- a/src/core/print_view_manager_base_qt.h
+++ b/src/core/print_view_manager_base_qt.h
@@ -97,7 +97,7 @@ protected:
int number_pages_; // Number of pages to print in the print job.
int cookie_;
- scoped_ptr<base::DictionaryValue> m_printSettings;
+ std::unique_ptr<base::DictionaryValue> m_printSettings;
// content::NotificationObserver implementation.
void Observe(int,
diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp
index 26a6c268..117c2e40 100644
--- a/src/core/print_view_manager_qt.cpp
+++ b/src/core/print_view_manager_qt.cpp
@@ -63,7 +63,7 @@ static const qreal kMicronsToMillimeter = 1000.0f;
static std::vector<char>
GetStdVectorFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
- scoped_ptr<base::SharedMemory> shared_buf(
+ std::unique_ptr<base::SharedMemory> shared_buf(
new base::SharedMemory(handle, true));
if (!shared_buf->Map(data_size)) {
@@ -76,7 +76,7 @@ GetStdVectorFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
static scoped_refptr<base::RefCountedBytes>
GetBytesFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
- scoped_ptr<base::SharedMemory> shared_buf(
+ std::unique_ptr<base::SharedMemory> shared_buf(
new base::SharedMemory(handle, true));
if (!shared_buf->Map(data_size)) {
@@ -139,7 +139,7 @@ static void applyQPageLayoutSettingsToDictionary(const QPageLayout &pageLayout,
{
//Set page size attributes, chromium expects these in micrometers
QSizeF pageSizeInMilimeter = pageLayout.pageSize().size(QPageSize::Millimeter);
- scoped_ptr<base::DictionaryValue> sizeDict(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> sizeDict(new base::DictionaryValue);
sizeDict->SetInteger(printing::kSettingMediaSizeWidthMicrons, pageSizeInMilimeter.width() * kMicronsToMillimeter);
sizeDict->SetInteger(printing::kSettingMediaSizeHeightMicrons, pageSizeInMilimeter.height() * kMicronsToMillimeter);
printSettings.Set(printing::kSettingMediaSize, std::move(sizeDict));
diff --git a/src/core/printing_message_filter_qt.cpp b/src/core/printing_message_filter_qt.cpp
index 3c81896c..a84ec491 100644
--- a/src/core/printing_message_filter_qt.cpp
+++ b/src/core/printing_message_filter_qt.cpp
@@ -187,7 +187,7 @@ void PrintingMessageFilterQt::OnScriptedPrintReply(
void PrintingMessageFilterQt::OnUpdatePrintSettings(
int document_cookie, const base::DictionaryValue& job_settings,
IPC::Message* reply_msg) {
- scoped_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
+ std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
scoped_refptr<printing::PrinterQuery> printer_query;
printer_query = queue_->PopPrinterQuery(document_cookie);
diff --git a/src/core/proxy_config_service_qt.cpp b/src/core/proxy_config_service_qt.cpp
index bd5d0375..28a36d37 100644
--- a/src/core/proxy_config_service_qt.cpp
+++ b/src/core/proxy_config_service_qt.cpp
@@ -69,7 +69,7 @@ net::ProxyServer ProxyConfigServiceQt::fromQNetworkProxy(const QNetworkProxy &qt
//================ Based on ChromeProxyConfigService =======================
-ProxyConfigServiceQt::ProxyConfigServiceQt(scoped_ptr<ProxyConfigService> baseService)
+ProxyConfigServiceQt::ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService)
: m_baseService(baseService.release()),
m_registeredObserver(false)
{
diff --git a/src/core/proxy_config_service_qt.h b/src/core/proxy_config_service_qt.h
index da24e333..f2f9a221 100644
--- a/src/core/proxy_config_service_qt.h
+++ b/src/core/proxy_config_service_qt.h
@@ -41,7 +41,6 @@
#define PROXY_CONFIG_SERVICE_QT_H
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "net/proxy/proxy_config.h"
@@ -56,7 +55,7 @@ public:
static net::ProxyServer fromQNetworkProxy(const QNetworkProxy &);
- explicit ProxyConfigServiceQt(scoped_ptr<ProxyConfigService> baseService);
+ explicit ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService);
~ProxyConfigServiceQt() override;
// ProxyConfigService implementation:
@@ -73,7 +72,7 @@ private:
// Makes sure that the observer registration with the base service is set up.
void RegisterObserver();
- scoped_ptr<net::ProxyConfigService> m_baseService;
+ std::unique_ptr<net::ProxyConfigService> m_baseService;
base::ObserverList<net::ProxyConfigService::Observer, true> m_observers;
// Keep the last QNetworkProxy::applicationProxy state around.
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
index 6e44c5dc..d0ab0153 100644
--- a/src/core/qtwebengine.gypi
+++ b/src/core/qtwebengine.gypi
@@ -39,7 +39,7 @@
'<(chromium_src_dir)/ui/base/ui_base.gyp:ui_base',
'<(chromium_src_dir)/ui/gl/gl.gyp:gl',
'<(chromium_src_dir)/url/url.gyp:url_lib',
- '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ '<(chromium_src_dir)/v8/src/v8.gyp:v8',
'<(qtwebengine_root)/src/core/chrome_qt.gyp:chrome_qt',
],
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index a0ad53c1..a018788c 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -343,11 +343,6 @@ gfx::NativeView RenderWidgetHostViewQt::GetNativeView() const
return gfx::NativeView();
}
-gfx::NativeViewId RenderWidgetHostViewQt::GetNativeViewId() const
-{
- return 0;
-}
-
gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
{
return 0;
@@ -576,7 +571,7 @@ void RenderWidgetHostViewQt::SetIsLoading(bool)
// We use WebContentsDelegateQt::LoadingStateChanged to notify about loading state.
}
-void RenderWidgetHostViewQt::TextInputStateChanged(const ViewHostMsg_TextInputState_Params &params)
+void RenderWidgetHostViewQt::TextInputStateChanged(const content::TextInputState &params)
{
m_currentInputType = params.type;
m_delegate->inputMethodStateChanged(params.type != ui::TEXT_INPUT_TYPE_NONE);
@@ -660,7 +655,7 @@ void RenderWidgetHostViewQt::UnlockCompositingSurface()
{
}
-void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr<cc::CompositorFrame> frame)
+void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, std::unique_ptr<cc::CompositorFrame> frame)
{
bool scrollOffsetChanged = (m_lastScrollOffset != frame->metadata.root_scroll_offset);
bool contentsSizeChanged = (m_lastContentsSize != frame->metadata.root_layer_size);
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index fa698f0e..f834534d 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -42,7 +42,6 @@
#include "render_widget_host_view_qt_delegate.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "cc/resources/transferable_resource.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
@@ -120,7 +119,6 @@ public:
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;
virtual gfx::NativeViewAccessible GetNativeViewAccessible() Q_DECL_OVERRIDE;
virtual void Focus() Q_DECL_OVERRIDE;
virtual bool HasFocus() const Q_DECL_OVERRIDE;
@@ -134,7 +132,7 @@ public:
virtual void UnlockMouse() 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&) Q_DECL_OVERRIDE;
+ virtual void TextInputStateChanged(const content::TextInputState& params) 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;
@@ -146,7 +144,7 @@ public:
virtual bool CanCopyToVideoFrame() const Q_DECL_OVERRIDE;
virtual bool HasAcceleratedSurface(const gfx::Size&) Q_DECL_OVERRIDE;
- virtual void OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr<cc::CompositorFrame> frame) Q_DECL_OVERRIDE;
+ virtual void OnSwapCompositorFrame(uint32_t output_surface_id, std::unique_ptr<cc::CompositorFrame> frame) Q_DECL_OVERRIDE;
virtual void GetScreenInfo(blink::WebScreenInfo* results) Q_DECL_OVERRIDE;
virtual gfx::Rect GetBoundsInRootWindow() Q_DECL_OVERRIDE;
virtual void ProcessAckedTouchEvent(const content::TouchEventWithLatencyInfo &touch, content::InputEventAckState ack_result) Q_DECL_OVERRIDE;
@@ -214,7 +212,7 @@ private:
bool m_touchMotionStarted;
QMap<int, int> m_touchIdMapping;
QList<QTouchEvent::TouchPoint> m_previousTouchPoints;
- scoped_ptr<RenderWidgetHostViewQtDelegate> m_delegate;
+ std::unique_ptr<RenderWidgetHostViewQtDelegate> m_delegate;
QExplicitlySharedDataPointer<ChromiumCompositorData> m_chromiumCompositorData;
cc::ReturnedResourceArray m_resourcesToRelease;
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 97b0f1dc..2b9970cc 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -47,14 +47,14 @@
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/renderer/spellchecker/spellcheck_provider.h"
#endif
-#include "components/cdm/renderer/widevine_key_systems.h"
+#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "components/error_page/common/error_page_params.h"
#include "components/error_page/common/localized_error.h"
#if defined (ENABLE_BASIC_PRINTING)
#include "components/printing/renderer/print_web_view_helper.h"
#endif // if defined(ENABLE_BASIC_PRINTING)
#include "components/visitedlink/renderer/visitedlink_slave.h"
-#include "components/web_cache/renderer/web_cache_render_process_observer.h"
+#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
@@ -97,7 +97,7 @@ void ContentRendererClientQt::RenderThreadStarted()
{
content::RenderThread *renderThread = content::RenderThread::Get();
m_visitedLinkSlave.reset(new visitedlink::VisitedLinkSlave);
- m_webCacheObserver.reset(new web_cache::WebCacheRenderProcessObserver());
+ m_webCacheImpl.reset(new web_cache::WebCacheImpl());
renderThread->AddObserver(m_visitedLinkSlave.data());
renderThread->AddObserver(UserResourceController::instance());
@@ -114,7 +114,7 @@ void ContentRendererClientQt::RenderThreadStarted()
void ContentRendererClientQt::RenderViewCreated(content::RenderView* render_view)
{
// RenderViewObservers destroy themselves with their RenderView.
- new RenderViewObserverQt(render_view, m_webCacheObserver.data());
+ new RenderViewObserverQt(render_view, m_webCacheImpl.data());
new WebChannelIPCTransport(render_view);
UserResourceController::instance()->renderViewCreated(render_view);
#if defined(ENABLE_SPELLCHECK)
@@ -123,9 +123,8 @@ void ContentRendererClientQt::RenderViewCreated(content::RenderView* render_view
#if defined(ENABLE_BASIC_PRINTING)
new printing::PrintWebViewHelper(
- render_view,
- scoped_ptr<printing::PrintWebViewHelper::Delegate>(
- new PrintWebViewHelperDelegateQt()));
+ render_view,
+ base::WrapUnique(new PrintWebViewHelperDelegateQt()));
#endif // defined(ENABLE_BASIC_PRINTING)
}
@@ -178,7 +177,7 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderFrame* re
error_page::LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost
, error.staleCopyInCache && !isPost, false, false, locale
- , scoped_ptr<error_page::ErrorPageParams>(), &errorStrings);
+ , std::unique_ptr<error_page::ErrorPageParams>(), &errorStrings);
resourceId = IDR_NET_ERROR_HTML;
@@ -209,6 +208,8 @@ bool ContentRendererClientQt::IsLinkVisited(unsigned long long linkHash)
// found in the LICENSE file.
#if defined(ENABLE_PEPPER_CDMS)
+static const char kExternalClearKeyPepperType[] = "application/x-ppapi-clearkey-cdm";
+
static bool IsPepperCdmAvailable(const std::string& pepper_type,
std::vector<base::string16>* additional_param_names,
std::vector<base::string16>* additional_param_values)
@@ -224,21 +225,94 @@ static bool IsPepperCdmAvailable(const std::string& pepper_type,
return is_available;
}
+// KeySystemProperties implementation for external Clear Key systems.
+class ExternalClearKeyProperties : public media::KeySystemProperties
+{
+public:
+ explicit ExternalClearKeyProperties(const std::string& key_system_name)
+ : key_system_name_(key_system_name) {}
+
+ std::string GetKeySystemName() const override { return key_system_name_; }
+ bool IsSupportedInitDataType(media::EmeInitDataType init_data_type) const override
+ {
+ switch (init_data_type) {
+ case media::EmeInitDataType::WEBM:
+ case media::EmeInitDataType::KEYIDS:
+ return true;
+
+ case media::EmeInitDataType::CENC:
+#if defined(USE_PROPRIETARY_CODECS)
+ return true;
+#else
+ return false;
+#endif // defined(USE_PROPRIETARY_CODECS)
+
+ case media::EmeInitDataType::UNKNOWN:
+ return false;
+ }
+ NOTREACHED();
+ return false;
+ }
+
+ media::SupportedCodecs GetSupportedCodecs() const override
+ {
+#if defined(USE_PROPRIETARY_CODECS)
+ return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
+#else
+ return media::EME_CODEC_WEBM_ALL;
+#endif
+ }
+
+ media::EmeConfigRule GetRobustnessConfigRule(
+ media::EmeMediaType media_type,
+ const std::string& requested_robustness) const override
+ {
+ return requested_robustness.empty() ? media::EmeConfigRule::SUPPORTED
+ : media::EmeConfigRule::NOT_SUPPORTED;
+ }
+
+ // Persistent license sessions are faked.
+ media::EmeSessionTypeSupport GetPersistentLicenseSessionSupport() const override
+ {
+ return media::EmeSessionTypeSupport::SUPPORTED;
+ }
+
+ media::EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport() const override {
+ return media::EmeSessionTypeSupport::NOT_SUPPORTED;
+ }
+
+ media::EmeFeatureSupport GetPersistentStateSupport() const override
+ {
+ return media::EmeFeatureSupport::REQUESTABLE;
+ }
+
+ media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override
+ {
+ return media::EmeFeatureSupport::NOT_SUPPORTED;
+ }
+
+ std::string GetPepperType() const override
+ {
+ return kExternalClearKeyPepperType;
+ }
+
+private:
+ const std::string key_system_name_;
+};
+
// External Clear Key (used for testing).
-static void AddExternalClearKey(std::vector<media::KeySystemInfo>* concrete_key_systems)
+static void AddExternalClearKey(std::vector<std::unique_ptr<media::KeySystemProperties>>* concrete_key_systems)
{
- static const char kExternalClearKeyKeySystem[] =
- "org.chromium.externalclearkey";
- static const char kExternalClearKeyDecryptOnlyKeySystem[] =
- "org.chromium.externalclearkey.decryptonly";
- static const char kExternalClearKeyFileIOTestKeySystem[] =
- "org.chromium.externalclearkey.fileiotest";
- static const char kExternalClearKeyInitializeFailKeySystem[] =
- "org.chromium.externalclearkey.initializefail";
- static const char kExternalClearKeyCrashKeySystem[] =
- "org.chromium.externalclearkey.crash";
- static const char kExternalClearKeyPepperType[] =
- "application/x-ppapi-clearkey-cdm";
+ static const char kExternalClearKeyKeySystem[] =
+ "org.chromium.externalclearkey";
+ static const char kExternalClearKeyDecryptOnlyKeySystem[] =
+ "org.chromium.externalclearkey.decryptonly";
+ static const char kExternalClearKeyFileIOTestKeySystem[] =
+ "org.chromium.externalclearkey.fileiotest";
+ static const char kExternalClearKeyInitializeFailKeySystem[] =
+ "org.chromium.externalclearkey.initializefail";
+ static const char kExternalClearKeyCrashKeySystem[] =
+ "org.chromium.externalclearkey.crash";
std::vector<base::string16> additional_param_names;
std::vector<base::string16> additional_param_values;
@@ -247,53 +321,31 @@ static void AddExternalClearKey(std::vector<media::KeySystemInfo>* concrete_key_
&additional_param_values))
return;
- media::KeySystemInfo info;
- info.key_system = kExternalClearKeyKeySystem;
-
- info.supported_init_data_types =
- media::kInitDataTypeMaskWebM | media::kInitDataTypeMaskKeyIds;
- info.supported_codecs = media::EME_CODEC_WEBM_ALL;
-#if defined(USE_PROPRIETARY_CODECS)
- info.supported_init_data_types |= media::kInitDataTypeMaskCenc;
- info.supported_codecs |= media::EME_CODEC_MP4_ALL;
-#endif // defined(USE_PROPRIETARY_CODECS)
-
- info.max_audio_robustness = media::EmeRobustness::EMPTY;
- info.max_video_robustness = media::EmeRobustness::EMPTY;
-
- // Persistent sessions are faked.
- info.persistent_license_support = media::EmeSessionTypeSupport::SUPPORTED;
- info.persistent_release_message_support =
- media::EmeSessionTypeSupport::NOT_SUPPORTED;
- info.persistent_state_support = media::EmeFeatureSupport::REQUESTABLE;
- info.distinctive_identifier_support = media::EmeFeatureSupport::NOT_SUPPORTED;
-
- info.pepper_type = kExternalClearKeyPepperType;
-
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyKeySystem));
// Add support of decrypt-only mode in ClearKeyCdm.
- info.key_system = kExternalClearKeyDecryptOnlyKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyDecryptOnlyKeySystem));
// A key system that triggers FileIO test in ClearKeyCdm.
- info.key_system = kExternalClearKeyFileIOTestKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyFileIOTestKeySystem));
// A key system that Chrome thinks is supported by ClearKeyCdm, but actually
// will be refused by ClearKeyCdm. This is to test the CDM initialization
// failure case.
- info.key_system = kExternalClearKeyInitializeFailKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyInitializeFailKeySystem));
// A key system that triggers a crash in ClearKeyCdm.
- info.key_system = kExternalClearKeyCrashKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem));
}
#if defined(WIDEVINE_CDM_AVAILABLE)
-static void AddPepperBasedWidevine(std::vector<media::KeySystemInfo>* concrete_key_systems)
+static void AddPepperBasedWidevine(std::vector<std::unique_ptr<media::KeySystemProperties>> *concrete_key_systems)
{
//#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
// Version glibc_version(gnu_get_libc_version());
@@ -322,26 +374,25 @@ static void AddPepperBasedWidevine(std::vector<media::KeySystemInfo>* concrete_k
supported_codecs |= media::EME_CODEC_MP4_AAC;
#endif // defined(USE_PROPRIETARY_CODECS)
- cdm::AddWidevineWithCodecs(
+ concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties(
supported_codecs,
media::EmeRobustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
media::EmeRobustness::SW_SECURE_DECODE, // Maximum video robustness.
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license.
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message.
- media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
- media::EmeFeatureSupport::NOT_SUPPORTED, // Distinctive identifier.
- concrete_key_systems);
+ media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
+ media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier.
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
-void ContentRendererClientQt::AddKeySystems(std::vector<media::KeySystemInfo>* key_systems_info)
+void ContentRendererClientQt::AddSupportedKeySystems(std::vector<std::unique_ptr<media::KeySystemProperties>> *key_systems)
{
#if defined(ENABLE_PEPPER_CDMS)
- AddExternalClearKey(key_systems_info);
+ AddExternalClearKey(key_systems);
#if defined(WIDEVINE_CDM_AVAILABLE)
- AddPepperBasedWidevine(key_systems_info);
+ AddPepperBasedWidevine(key_systems);
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
}
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index b17c618c..72b4e406 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -49,7 +49,7 @@ class VisitedLinkSlave;
}
namespace web_cache {
-class WebCacheRenderProcessObserver;
+class WebCacheImpl;
}
#if defined(ENABLE_SPELLCHECK)
@@ -72,14 +72,14 @@ public:
virtual unsigned long long VisitedLinkHash(const char *canonicalUrl, size_t length) Q_DECL_OVERRIDE;
virtual bool IsLinkVisited(unsigned long long linkHash) Q_DECL_OVERRIDE;
- virtual void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) Q_DECL_OVERRIDE;
+ virtual void AddSupportedKeySystems(std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) Q_DECL_OVERRIDE;
virtual void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) Q_DECL_OVERRIDE;
virtual void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) Q_DECL_OVERRIDE;
private:
QScopedPointer<visitedlink::VisitedLinkSlave> m_visitedLinkSlave;
- QScopedPointer<web_cache::WebCacheRenderProcessObserver> m_webCacheObserver;
+ QScopedPointer<web_cache::WebCacheImpl> m_webCacheImpl;
#if defined(ENABLE_SPELLCHECK)
QScopedPointer<SpellCheck> m_spellCheck;
#endif
diff --git a/src/core/renderer/render_frame_observer_qt.cpp b/src/core/renderer/render_frame_observer_qt.cpp
index 8f65ea8f..77bc89f6 100644
--- a/src/core/renderer/render_frame_observer_qt.cpp
+++ b/src/core/renderer/render_frame_observer_qt.cpp
@@ -44,7 +44,7 @@
#include "render_frame_observer_qt.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "chrome/renderer/pepper/pepper_shared_memory_message_filter.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
@@ -66,9 +66,9 @@ RenderFrameObserverQt::~RenderFrameObserverQt()
void RenderFrameObserverQt::DidCreatePepperPlugin(content::RendererPpapiHost* host)
{
host->GetPpapiHost()->AddHostFactoryFilter(
- scoped_ptr<ppapi::host::HostFactory>(new PepperRendererHostFactoryQt(host)));
+ base::WrapUnique(new PepperRendererHostFactoryQt(host)));
host->GetPpapiHost()->AddInstanceMessageFilter(
- scoped_ptr<ppapi::host::InstanceMessageFilter>(new PepperSharedMemoryMessageFilter(host)));
+ base::WrapUnique(new PepperSharedMemoryMessageFilter(host)));
}
#endif
diff --git a/src/core/renderer/render_view_observer_qt.cpp b/src/core/renderer/render_view_observer_qt.cpp
index 68c0fc08..523d9705 100644
--- a/src/core/renderer/render_view_observer_qt.cpp
+++ b/src/core/renderer/render_view_observer_qt.cpp
@@ -41,7 +41,7 @@
#include "common/qt_messages.h"
-#include "components/web_cache/renderer/web_cache_render_process_observer.h"
+#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/renderer/render_view.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
@@ -53,9 +53,9 @@
RenderViewObserverQt::RenderViewObserverQt(
content::RenderView* render_view,
- web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer)
+ web_cache::WebCacheImpl* web_cache_impl)
: content::RenderViewObserver(render_view)
- , m_web_cache_render_process_observer(web_cache_render_process_observer)
+ , m_web_cache_impl(web_cache_impl)
{
}
@@ -102,6 +102,6 @@ bool RenderViewObserverQt::OnMessageReceived(const IPC::Message& message)
void RenderViewObserverQt::Navigate(const GURL &)
{
- if (m_web_cache_render_process_observer)
- m_web_cache_render_process_observer->ExecutePendingClearCache();
+ if (m_web_cache_impl)
+ m_web_cache_impl->ExecutePendingClearCache();
}
diff --git a/src/core/renderer/render_view_observer_qt.h b/src/core/renderer/render_view_observer_qt.h
index 4839ae06..06d97ee8 100644
--- a/src/core/renderer/render_view_observer_qt.h
+++ b/src/core/renderer/render_view_observer_qt.h
@@ -44,13 +44,13 @@
#include <QtGlobal>
namespace web_cache {
-class WebCacheRenderProcessObserver;
+class WebCacheImpl;
}
class RenderViewObserverQt : public content::RenderViewObserver {
public:
RenderViewObserverQt(content::RenderView* render_view,
- web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer);
+ web_cache::WebCacheImpl* web_cache_impl);
private:
void onFetchDocumentMarkup(quint64 requestId);
@@ -62,7 +62,7 @@ private:
virtual bool OnMessageReceived(const IPC::Message& message) Q_DECL_OVERRIDE;
virtual void Navigate(const GURL& url) Q_DECL_OVERRIDE;
- web_cache::WebCacheRenderProcessObserver* m_web_cache_render_process_observer;
+ web_cache::WebCacheImpl* m_web_cache_impl;
DISALLOW_COPY_AND_ASSIGN(RenderViewObserverQt);
};
diff --git a/src/core/renderer/user_resource_controller.h b/src/core/renderer/user_resource_controller.h
index 8eba12ab..d0b5088d 100644
--- a/src/core/renderer/user_resource_controller.h
+++ b/src/core/renderer/user_resource_controller.h
@@ -40,7 +40,7 @@
#ifndef USER_RESOURCE_CONTROLLER_H
#define USER_RESOURCE_CONTROLLER_H
-#include "content/public/renderer/render_process_observer.h"
+#include "content/public/renderer/render_thread_observer.h"
#include "common/user_script_data.h"
@@ -57,7 +57,7 @@ class RenderFrame;
class RenderView;
}
-class UserResourceController : public content::RenderProcessObserver {
+class UserResourceController : public content::RenderThreadObserver {
public:
static UserResourceController *instance();
diff --git a/src/core/resource_bundle_qt.cpp b/src/core/resource_bundle_qt.cpp
index 115dc56d..5f5cead9 100644
--- a/src/core/resource_bundle_qt.cpp
+++ b/src/core/resource_bundle_qt.cpp
@@ -98,7 +98,7 @@ std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale)
#if defined(OS_LINUX)
int locale_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(kWebEngineLocale);
if (locale_fd > -1) {
- scoped_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
+ std::unique_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
data_pack->LoadFromFile(base::File(locale_fd));
locale_resources_data_.reset(data_pack.release());
return app_locale;
@@ -115,7 +115,7 @@ std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale)
return std::string();
}
- scoped_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
+ std::unique_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
if (!data_pack->LoadFromPath(locale_file_path)) {
UMA_HISTOGRAM_ENUMERATION("ResourceBundle.LoadLocaleResourcesError",
logging::GetLastSystemErrorCode(), 16000);
diff --git a/src/core/resource_context_qt.cpp b/src/core/resource_context_qt.cpp
index 5cb21760..1ab1ea22 100644
--- a/src/core/resource_context_qt.cpp
+++ b/src/core/resource_context_qt.cpp
@@ -39,6 +39,7 @@
#include "resource_context_qt.h"
+#include "content/public/browser/storage_partition.h"
#include "net/url_request/url_request_context_getter.h"
#include "browser_context_qt.h"
@@ -53,6 +54,8 @@ net::HostResolver *ResourceContextQt::GetHostResolver()
net::URLRequestContext* ResourceContextQt::GetRequestContext()
{
Q_ASSERT(context);
+ // FIXME: This is the only remaining use of GetRequestContext(),
+ // but we are on the wrong thread for calling BrowserContext::GetDefaultStoragePartition
return context->GetRequestContext()->GetURLRequestContext();
}
diff --git a/src/core/resource_dispatcher_host_delegate_qt.cpp b/src/core/resource_dispatcher_host_delegate_qt.cpp
index 73a64020..af8b02e1 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.cpp
+++ b/src/core/resource_dispatcher_host_delegate_qt.cpp
@@ -92,7 +92,7 @@ QString ResourceDispatcherHostLoginDelegateQt::realm() const
QString ResourceDispatcherHostLoginDelegateQt::host() const
{
- return QString::fromStdString(m_authInfo->challenger.ToString());
+ return QString::fromStdString(m_authInfo->challenger.host());
}
bool ResourceDispatcherHostLoginDelegateQt::isProxy() const
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index e96a544e..ed02a9db 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -60,7 +60,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPixelRef.h"
-#include "third_party/skia/include/utils/SkMatrix44.h"
+#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "url/gurl.h"
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 42c8db28..4ca2c4b6 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -226,7 +226,7 @@ void URLRequestContextGetterQt::generateStorage()
m_storage->set_cert_verifier(net::CertVerifier::CreateDefault());
- scoped_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
+ std::unique_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
// The System Proxy Resolver has issues on Windows with unconfigured network cards,
// which is why we want to use the v8 one
@@ -234,7 +234,7 @@ void URLRequestContextGetterQt::generateStorage()
m_dhcpProxyScriptFetcherFactory.reset(new net::DhcpProxyScriptFetcherFactory);
m_storage->set_proxy_service(net::CreateProxyServiceUsingV8ProxyResolver(
- scoped_ptr<net::ProxyConfigService>(proxyConfigService),
+ std::unique_ptr<net::ProxyConfigService>(proxyConfigService),
new net::ProxyScriptFetcherImpl(m_urlRequestContext.get()),
m_dhcpProxyScriptFetcherFactory->Create(m_urlRequestContext.get()),
host_resolver.get(),
@@ -242,10 +242,10 @@ void URLRequestContextGetterQt::generateStorage()
m_networkDelegate.get()));
m_storage->set_ssl_config_service(new net::SSLConfigServiceDefaults);
- m_storage->set_transport_security_state(scoped_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
+ m_storage->set_transport_security_state(std::unique_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
m_storage->set_http_auth_handler_factory(net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
- m_storage->set_http_server_properties(scoped_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
+ m_storage->set_http_server_properties(std::unique_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
// Give |m_storage| ownership at the end in case it's |mapped_host_resolver|.
m_storage->set_host_resolver(std::move(host_resolver));
@@ -284,7 +284,7 @@ void URLRequestContextGetterQt::generateCookieStore()
}
m_storage->set_channel_id_service(
- scoped_ptr<net::ChannelIDService>(new net::ChannelIDService(
+ base::WrapUnique(new net::ChannelIDService(
new net::DefaultChannelIDStore(channel_id_db.get()),
base::WorkerPool::GetTaskRunner(true))));
@@ -292,7 +292,7 @@ void URLRequestContextGetterQt::generateCookieStore()
m_storage->set_cookie_store(0);
m_cookieDelegate->setCookieMonster(0);
- scoped_ptr<net::CookieStore> cookieStore;
+ std::unique_ptr<net::CookieStore> cookieStore;
switch (m_persistentCookiesPolicy) {
case BrowserContextAdapter::NoPersistentCookies:
cookieStore =
@@ -324,6 +324,7 @@ void URLRequestContextGetterQt::generateCookieStore()
}
net::CookieMonster * const cookieMonster = static_cast<net::CookieMonster*>(cookieStore.get());
+ cookieStore->SetChannelIDServiceID(m_urlRequestContext->channel_id_service()->GetUniqueID());
m_storage->set_cookie_store(std::move(cookieStore));
const std::vector<std::string> cookieableSchemes(kCookieableSchemes, kCookieableSchemes + arraysize(kCookieableSchemes));
@@ -354,7 +355,7 @@ void URLRequestContextGetterQt::generateUserAgent()
QMutexLocker lock(&m_mutex);
m_updateUserAgent = true;
- m_storage->set_http_user_agent_settings(scoped_ptr<net::HttpUserAgentSettings>(
+ m_storage->set_http_user_agent_settings(std::unique_ptr<net::HttpUserAgentSettings>(
new net::StaticHttpUserAgentSettings(m_httpAcceptLanguage.toStdString(), m_httpUserAgent.toStdString())));
}
@@ -482,9 +483,9 @@ void URLRequestContextGetterQt::generateHttpCache()
m_httpNetworkSession.reset(new net::HttpNetworkSession(network_session_params));
}
- cache = new net::HttpCache(m_httpNetworkSession.get(), scoped_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
+ cache = new net::HttpCache(m_httpNetworkSession.get(), std::unique_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
- m_storage->set_http_transaction_factory(scoped_ptr<net::HttpCache>(cache));
+ m_storage->set_http_transaction_factory(std::unique_ptr<net::HttpCache>(cache));
}
void URLRequestContextGetterQt::clearHttpCache()
@@ -513,36 +514,36 @@ void URLRequestContextGetterQt::generateJobFactory()
QMutexLocker lock(&m_mutex);
m_updateJobFactory = false;
- scoped_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
{
// Chromium has a few protocol handlers ready for us, only pick blob: and throw away the rest.
content::ProtocolHandlerMap::iterator it = m_protocolHandlers.find(url::kBlobScheme);
Q_ASSERT(it != m_protocolHandlers.end());
- jobFactory->SetProtocolHandler(it->first, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
+ jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
m_protocolHandlers.clear();
}
- jobFactory->SetProtocolHandler(url::kDataScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
- jobFactory->SetProtocolHandler(url::kFileScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
+ jobFactory->SetProtocolHandler(url::kDataScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
+ jobFactory->SetProtocolHandler(url::kFileScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
content::BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
- jobFactory->SetProtocolHandler(kQrcSchemeQt, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
+ jobFactory->SetProtocolHandler(kQrcSchemeQt, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
jobFactory->SetProtocolHandler(url::kFtpScheme,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
+ std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- jobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ jobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
m_baseJobFactory = jobFactory.get();
// Set up interceptors in the reverse order.
- scoped_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
+ std::unique_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
for (content::URLRequestInterceptorScopedVector::reverse_iterator i = m_requestInterceptors.rbegin(); i != m_requestInterceptors.rend(); ++i)
- topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), make_scoped_ptr(*i)));
+ topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), std::unique_ptr<net::URLRequestInterceptor>(*i)));
m_requestInterceptors.weak_clear();
@@ -570,7 +571,7 @@ void URLRequestContextGetterQt::regenerateJobFactory()
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
}
diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h
index b6209030..8cfa8d75 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -44,7 +44,6 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
@@ -125,7 +124,7 @@ private:
std::unique_ptr<net::DhcpProxyScriptFetcherFactory> m_dhcpProxyScriptFetcherFactory;
scoped_refptr<CookieMonsterDelegateQt> m_cookieDelegate;
content::URLRequestInterceptorScopedVector m_requestInterceptors;
- scoped_ptr<net::HttpNetworkSession> m_httpNetworkSession;
+ std::unique_ptr<net::HttpNetworkSession> m_httpNetworkSession;
QList<QByteArray> m_installedCustomSchemes;
QWebEngineUrlRequestInterceptor* m_requestInterceptor;
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 3ab6ac95..ec6dc90c 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -247,7 +247,7 @@ static void serializeNavigationHistory(const content::NavigationController &cont
}
}
-static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, std::vector<scoped_ptr<content::NavigationEntry>> *entries, content::BrowserContext *browserContext)
+static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, std::vector<std::unique_ptr<content::NavigationEntry>> *entries, content::BrowserContext *browserContext)
{
int version;
input >> version;
@@ -296,7 +296,7 @@ static void deserializeNavigationHistory(QDataStream &input, int *currentIndex,
return;
}
- scoped_ptr<content::NavigationEntry> entry = content::NavigationController::CreateNavigationEntry(
+ std::unique_ptr<content::NavigationEntry> entry = content::NavigationController::CreateNavigationEntry(
toGurl(virtualUrl),
content::Referrer(toGurl(referrerUrl), static_cast<blink::WebReferrerPolicy>(referrerPolicy)),
// Use a transition type of reload so that we don't incorrectly
@@ -367,7 +367,7 @@ WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
{
int currentIndex;
- std::vector<scoped_ptr<content::NavigationEntry>> entries;
+ std::vector<std::unique_ptr<content::NavigationEntry>> entries;
deserializeNavigationHistory(input, &currentIndex, &entries, adapterClient->browserContextAdapter()->browserContext());
if (currentIndex == -1)
@@ -660,7 +660,7 @@ void WebContentsAdapter::selectAll()
void WebContentsAdapter::requestClose()
{
Q_D(WebContentsAdapter);
- d->webContents->DispatchBeforeUnload(false);
+ d->webContents->DispatchBeforeUnload();
}
void WebContentsAdapter::unselect()
@@ -889,7 +889,7 @@ void WebContentsAdapter::download(const QUrl &url, const QString &suggestedFileN
dlmd->setDownloadType(BrowserContextAdapterClient::UserRequested);
dlm->SetDelegate(dlmd);
- scoped_ptr<content::DownloadUrlParameters> params(
+ std::unique_ptr<content::DownloadUrlParameters> params(
content::DownloadUrlParameters::FromWebContents(webContents(), toGurl(url)));
params->set_suggested_name(toString16(suggestedFileName));
dlm->DownloadUrl(std::move(params));
@@ -1198,7 +1198,7 @@ void WebContentsAdapter::enterDrag(QDragEnterEvent *e, const QPoint &screenPos)
{
Q_D(WebContentsAdapter);
- scoped_ptr<content::DropData> ownedDropData;
+ std::unique_ptr<content::DropData> ownedDropData;
const content::DropData *rvhDropData = d->currentDropData;
if (!rvhDropData) {
// The drag originated outside the WebEngineView.
diff --git a/src/core/web_contents_adapter_p.h b/src/core/web_contents_adapter_p.h
index 5c0e8329..77522d29 100644
--- a/src/core/web_contents_adapter_p.h
+++ b/src/core/web_contents_adapter_p.h
@@ -55,7 +55,6 @@
#include <base/callback.h>
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include <QScopedPointer>
#include <QSharedPointer>
@@ -84,10 +83,10 @@ public:
~WebContentsAdapterPrivate();
scoped_refptr<WebEngineContext> engineContext;
QSharedPointer<BrowserContextAdapter> browserContextAdapter;
- scoped_ptr<content::WebContents> webContents;
- scoped_ptr<WebContentsDelegateQt> webContentsDelegate;
- scoped_ptr<RenderViewObserverHostQt> renderViewObserverHost;
- scoped_ptr<WebChannelIPCTransportHost> webChannelTransport;
+ std::unique_ptr<content::WebContents> webContents;
+ std::unique_ptr<WebContentsDelegateQt> webContentsDelegate;
+ std::unique_ptr<RenderViewObserverHostQt> renderViewObserverHost;
+ std::unique_ptr<WebChannelIPCTransportHost> webChannelTransport;
QWebChannel *webChannel;
unsigned int webChannelWorld;
WebContentsAdapterClient *adapterClient;
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h
index 3b14f6e0..878b651d 100644
--- a/src/core/web_engine_context.h
+++ b/src/core/web_engine_context.h
@@ -43,7 +43,6 @@
#include "qtwebenginecoreglobal.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include <QSharedPointer>
@@ -92,15 +91,15 @@ private:
WebEngineContext();
~WebEngineContext();
- scoped_ptr<base::RunLoop> m_runLoop;
- scoped_ptr<ContentMainDelegateQt> m_mainDelegate;
- scoped_ptr<content::ContentMainRunner> m_contentRunner;
- scoped_ptr<content::BrowserMainRunner> m_browserRunner;
+ std::unique_ptr<base::RunLoop> m_runLoop;
+ std::unique_ptr<ContentMainDelegateQt> m_mainDelegate;
+ std::unique_ptr<content::ContentMainRunner> m_contentRunner;
+ std::unique_ptr<content::BrowserMainRunner> m_browserRunner;
QObject* m_globalQObject;
QSharedPointer<QtWebEngineCore::BrowserContextAdapter> m_defaultBrowserContext;
- scoped_ptr<devtools_http_handler::DevToolsHttpHandler> m_devtools;
+ std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> m_devtools;
#if defined(ENABLE_BASIC_PRINTING)
- scoped_ptr<printing::PrintJobManager> m_printJobManager;
+ std::unique_ptr<printing::PrintJobManager> m_printJobManager;
#endif // defined(ENABLE_BASIC_PRINTING)
};
diff --git a/src/core/web_engine_visited_links_manager.cpp b/src/core/web_engine_visited_links_manager.cpp
index ded9d5d2..0cf76d45 100644
--- a/src/core/web_engine_visited_links_manager.cpp
+++ b/src/core/web_engine_visited_links_manager.cpp
@@ -44,7 +44,6 @@
#include "content_browser_client_qt.h"
#include "type_conversion.h"
-#include "base/memory/scoped_ptr.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "components/visitedlink/browser/visitedlink_master.h"
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 3bc4d666..88b7596d 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -3471,7 +3471,9 @@ void tst_QWebEnginePage::getUserMediaRequest()
GetUserMediaTestPage *page = new GetUserMediaTestPage();
// We need to load content from a resource in order for the securityOrigin to be valid.
+ QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
page->load(QUrl("qrc:///resources/content.html"));
+ QTRY_COMPARE(loadSpy.count(), 1);
QVERIFY(evaluateJavaScriptSync(page, QStringLiteral("!!navigator.webkitGetUserMedia")).toBool());
evaluateJavaScriptSync(page, QStringLiteral("navigator.webkitGetUserMedia({audio: true}, function() {}, function(){})"));
diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py
index b57e3cd5..25a57e89 100644
--- a/tools/scripts/version_resolver.py
+++ b/tools/scripts/version_resolver.py
@@ -38,9 +38,9 @@ import json
import urllib2
import git_submodule as GitSubmodule
-chromium_version = '51.0.2704.106'
-chromium_branch = '2704'
-ninja_version = 'v1.6.0'
+chromium_version = '52.0.2743.76'
+chromium_branch = '2743'
+ninja_version = 'v1.7.1'
json_url = 'http://omahaproxy.appspot.com/all.json'