summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.h
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2019-07-11 13:15:39 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2019-08-22 13:00:16 +0200
commit55a4c28542c6dc9e4a4edc0aab7043feef2ab0d2 (patch)
tree551751f87ed36388ebd545edd5f31a48859a2719 /src/core/web_contents_adapter.h
parentf0c471d9e2f3e9808cbf8c57bee533e8254ad1c5 (diff)
Refactor findText handling
Move most of the findText logic to the QtWebEngineCore::FindTextHelper class. This change also separates findText callbacks in the new class for getting rid of the request ID conversion and make it easier to remove them in Qt6. Task-number: QTBUG-50420 Change-Id: I348cedd0f90a49f9b360165c46319aeed2c236c0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.h')
-rw-r--r--src/core/web_contents_adapter.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index baf9d241c..11f8f9cb1 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -85,6 +85,7 @@ namespace QtWebEngineCore {
class DevToolsFrontendQt;
class FaviconManager;
+class FindTextHelper;
class MessagePassingInterface;
class ProfileQt;
class RenderViewObserverHostQt;
@@ -158,8 +159,6 @@ public:
quint64 runJavaScriptCallbackResult(const QString &javaScript, quint32 worldId);
quint64 fetchDocumentMarkup();
quint64 fetchDocumentInnerText();
- quint64 findText(const QString &subString, bool caseSensitively, bool findBackward);
- void stopFinding();
void updateWebPreferences(const content::WebPreferences &webPreferences);
void download(const QUrl &url, const QString &suggestedFileName,
const QUrl &referrerUrl = QUrl(),
@@ -205,6 +204,7 @@ public:
void setWebChannel(QWebChannel *, uint worldId);
#endif
FaviconManager *faviconManager();
+ FindTextHelper *findTextHelper();
QPointF lastScrollOffset() const;
QSizeF lastContentsSize() const;
@@ -263,7 +263,6 @@ private:
#endif
WebContentsAdapterClient *m_adapterClient;
quint64 m_nextRequestId;
- int m_lastFindRequestId;
std::unique_ptr<content::DropData> m_currentDropData;
uint m_currentDropAction;
bool m_updateDragActionCalled;