summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-12-19 12:37:02 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-25 14:41:06 +0000
commitf4a8ce98bd371acf1ca1eb2c58a8403e8795a670 (patch)
tree1f2305261b605aae31e5f8737ffcb275986baf1e /src/core/web_contents_adapter.cpp
parent448478729cfdf5098dd24a6a870bacdbcd8cf9a7 (diff)
Adaptations for Chromium 63
Change-Id: I551c7091bbc0463bed94180313eb2bfe92f0ad84 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 286856c71..f87cc115b 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -389,7 +389,7 @@ QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavig
// Set up the file access rights for the selected navigation entry.
// TODO(joth): This is duplicated from chrome/.../session_restore.cc and
// should be shared e.g. in NavigationController. http://crbug.com/68222
- const int id = newWebContents->GetRenderProcessHost()->GetID();
+ const int id = newWebContents->GetMainFrame()->GetProcess()->GetID();
const content::PageState& pageState = controller.GetActiveEntry()->GetPageState();
const std::vector<base::FilePath>& filePaths = pageState.GetReferencedFiles();
for (std::vector<base::FilePath>::const_iterator file = filePaths.begin(); file != filePaths.end(); ++file)
@@ -478,7 +478,7 @@ void WebContentsAdapter::initialize(WebContentsAdapterClient *adapterClient)
content::RenderViewHost *rvh = d->webContents->GetRenderViewHost();
Q_ASSERT(rvh);
if (!rvh->IsRenderViewLive())
- static_cast<content::WebContentsImpl*>(d->webContents.get())->CreateRenderViewForRenderManager(rvh, MSG_ROUTING_NONE, MSG_ROUTING_NONE, content::FrameReplicationState());
+ static_cast<content::WebContentsImpl*>(d->webContents.get())->CreateRenderViewForRenderManager(rvh, MSG_ROUTING_NONE, MSG_ROUTING_NONE, base::UnguessableToken::Create(), content::FrameReplicationState());
}
void WebContentsAdapter::reattachRWHV()
@@ -707,7 +707,9 @@ QString WebContentsAdapter::pageTitle() const
QString WebContentsAdapter::selectedText() const
{
Q_D(const WebContentsAdapter);
- return toQt(d->webContents->GetRenderWidgetHostView()->GetSelectedText());
+ if (auto *rwhv = d->webContents->GetRenderWidgetHostView())
+ return toQt(rwhv->GetSelectedText());
+ return QString();
}
void WebContentsAdapter::undo()
@@ -853,7 +855,7 @@ void WebContentsAdapter::setZoomFactor(qreal factor)
content::HostZoomMap *zoomMap = content::HostZoomMap::GetForWebContents(d->webContents.get());
if (zoomMap) {
- int render_process_id = d->webContents->GetRenderProcessHost()->GetID();
+ int render_process_id = d->webContents->GetMainFrame()->GetProcess()->GetID();
int render_view_id = d->webContents->GetRenderViewHost()->GetRoutingID();
zoomMap->SetTemporaryZoomLevel(render_process_id, render_view_id, zoomLevel);
}