summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-02-12 12:59:00 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-13 14:28:04 +0100
commit71edccabd4c359eb1ac9d6f6c3220b0d308f3a7b (patch)
tree4fdd781b1371c9ee4218cac37e9f44dcc5dbb509
parent0bb596fbebd9317ef7acf00860cbcca45193fcee (diff)
Move the requestID argument before the result
This tries to get the order of declaration to be consistent. It also follows the order used by Chromium in some places where the routing_id usually comes first, then the request_id and then the result of the asynchronous request. Change-Id: I88e164dee67e1631161a222f7dd7a4679c3d3acd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/core/common/qt_messages.h8
-rw-r--r--src/core/qt_render_view_observer_host.cpp8
-rw-r--r--src/core/qt_render_view_observer_host.h4
-rw-r--r--src/core/renderer/qt_render_view_observer.cpp8
-rw-r--r--src/core/web_contents_adapter.cpp2
-rw-r--r--src/core/web_contents_adapter_client.h6
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h6
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp6
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h6
9 files changed, 27 insertions, 27 deletions
diff --git a/src/core/common/qt_messages.h b/src/core/common/qt_messages.h
index 47303d38..3150a937 100644
--- a/src/core/common/qt_messages.h
+++ b/src/core/common/qt_messages.h
@@ -34,9 +34,9 @@ IPC_MESSAGE_ROUTED1(QtRenderViewObserver_FetchDocumentInnerText,
// These are messages sent from the renderer back to the browser process.
IPC_MESSAGE_ROUTED2(QtRenderViewObserverHost_DidFetchDocumentMarkup,
- base::string16 /* markup */,
- uint64 /* requestId */)
+ uint64 /* requestId */,
+ base::string16 /* markup */)
IPC_MESSAGE_ROUTED2(QtRenderViewObserverHost_DidFetchDocumentInnerText,
- base::string16 /* innerText */,
- uint64 /* requestId */)
+ uint64 /* requestId */,
+ base::string16 /* innerText */)
diff --git a/src/core/qt_render_view_observer_host.cpp b/src/core/qt_render_view_observer_host.cpp
index 4b3cc018..be811e0b 100644
--- a/src/core/qt_render_view_observer_host.cpp
+++ b/src/core/qt_render_view_observer_host.cpp
@@ -75,12 +75,12 @@ bool QtRenderViewObserverHost::OnMessageReceived(const IPC::Message& message)
}
-void QtRenderViewObserverHost::onDidFetchDocumentMarkup(const base::string16& markup, quint64 requestId)
+void QtRenderViewObserverHost::onDidFetchDocumentMarkup(quint64 requestId, const base::string16& markup)
{
- m_adapterClient->didFetchDocumentMarkup(toQt(markup), requestId);
+ m_adapterClient->didFetchDocumentMarkup(requestId, toQt(markup));
}
-void QtRenderViewObserverHost::onDidFetchDocumentInnerText(const base::string16& innerText, quint64 requestId)
+void QtRenderViewObserverHost::onDidFetchDocumentInnerText(quint64 requestId, const base::string16& innerText)
{
- m_adapterClient->didFetchDocumentInnerText(toQt(innerText), requestId);
+ m_adapterClient->didFetchDocumentInnerText(requestId, toQt(innerText));
}
diff --git a/src/core/qt_render_view_observer_host.h b/src/core/qt_render_view_observer_host.h
index 7d93176c..375bc816 100644
--- a/src/core/qt_render_view_observer_host.h
+++ b/src/core/qt_render_view_observer_host.h
@@ -60,8 +60,8 @@ public:
private:
bool OnMessageReceived(const IPC::Message& message) Q_DECL_OVERRIDE;
- void onDidFetchDocumentMarkup(const base::string16& markup, quint64 requestId);
- void onDidFetchDocumentInnerText(const base::string16& innerText, quint64 requestId);
+ void onDidFetchDocumentMarkup(quint64 requestId, const base::string16& markup);
+ void onDidFetchDocumentInnerText(quint64 requestId, const base::string16& innerText);
WebContentsAdapterClient *m_adapterClient;
};
diff --git a/src/core/renderer/qt_render_view_observer.cpp b/src/core/renderer/qt_render_view_observer.cpp
index 0f5ca655..192ba99f 100644
--- a/src/core/renderer/qt_render_view_observer.cpp
+++ b/src/core/renderer/qt_render_view_observer.cpp
@@ -58,16 +58,16 @@ void QtRenderViewObserver::onFetchDocumentMarkup(quint64 requestId)
{
Send(new QtRenderViewObserverHost_DidFetchDocumentMarkup(
routing_id(),
- render_view()->GetWebView()->mainFrame()->document().createMarkup(),
- requestId));
+ requestId,
+ render_view()->GetWebView()->mainFrame()->document().createMarkup()));
}
void QtRenderViewObserver::onFetchDocumentInnerText(quint64 requestId)
{
Send(new QtRenderViewObserverHost_DidFetchDocumentInnerText(
routing_id(),
- render_view()->GetWebView()->mainFrame()->document().documentElement().innerText(),
- requestId));
+ requestId,
+ render_view()->GetWebView()->mainFrame()->document().documentElement().innerText()));
}
bool QtRenderViewObserver::OnMessageReceived(const IPC::Message& message)
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index af141b5d..ea360dc9 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -148,7 +148,7 @@ static QVariant fromJSValue(const base::Value *result)
static void callbackOnEvaluateJS(WebContentsAdapterClient *adapterClient, quint64 requestId, const base::Value *result)
{
- adapterClient->didRunJavaScript(fromJSValue(result), requestId);
+ adapterClient->didRunJavaScript(requestId, fromJSValue(result));
}
static QStringList listRecursively(const QDir& dir) {
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index b0752173..ba6a4535 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -132,9 +132,9 @@ public:
virtual bool isFullScreen() const = 0;
virtual void javascriptDialog(QSharedPointer<JavaScriptDialogController>) = 0;
virtual void runFileChooser(FileChooserMode, const QString &defaultFileName, const QStringList &acceptedMimeTypes) = 0;
- virtual void didRunJavaScript(const QVariant& result, quint64 requestId) = 0;
- virtual void didFetchDocumentMarkup(const QString& result, quint64 requestId) = 0;
- virtual void didFetchDocumentInnerText(const QString& result, quint64 requestId) = 0;
+ virtual void didRunJavaScript(quint64 requestId, const QVariant& result) = 0;
+ virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) = 0;
+ virtual void didFetchDocumentInnerText(quint64 requestId, const QString& result) = 0;
virtual void passOnFocus(bool reverse) = 0;
virtual void javaScriptConsoleMessage(int level, const QString& message, int lineNumber, const QString& sourceID) = 0;
};
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 4e0e8115..d7c84a1a 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -137,9 +137,9 @@ public:
virtual bool contextMenuRequested(const WebEngineContextMenuData &) Q_DECL_OVERRIDE;
virtual void javascriptDialog(QSharedPointer<JavaScriptDialogController>) Q_DECL_OVERRIDE;
virtual void runFileChooser(FileChooserMode, const QString &defaultFileName, const QStringList &acceptedMimeTypes) Q_DECL_OVERRIDE;
- virtual void didRunJavaScript(const QVariant&, quint64) Q_DECL_OVERRIDE { }
- virtual void didFetchDocumentMarkup(const QString&, quint64) Q_DECL_OVERRIDE { }
- virtual void didFetchDocumentInnerText(const QString&, quint64) Q_DECL_OVERRIDE { }
+ virtual void didRunJavaScript(quint64, const QVariant&) Q_DECL_OVERRIDE { }
+ virtual void didFetchDocumentMarkup(quint64, const QString&) Q_DECL_OVERRIDE { }
+ virtual void didFetchDocumentInnerText(quint64, const QString&) Q_DECL_OVERRIDE { }
virtual void passOnFocus(bool reverse) Q_DECL_OVERRIDE;
virtual void javaScriptConsoleMessage(int level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index eedf76d1..b082f219 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -163,19 +163,19 @@ void QWebEnginePagePrivate::close()
Q_EMIT q->windowCloseRequested();
}
-void QWebEnginePagePrivate::didRunJavaScript(const QVariant& result, quint64 requestId)
+void QWebEnginePagePrivate::didRunJavaScript(quint64 requestId, const QVariant& result)
{
if (QExplicitlySharedDataPointer<VariantCallback> callback = m_variantCallbacks.take(requestId))
(*callback)(result);
}
-void QWebEnginePagePrivate::didFetchDocumentMarkup(const QString& result, quint64 requestId)
+void QWebEnginePagePrivate::didFetchDocumentMarkup(quint64 requestId, const QString& result)
{
if (QExplicitlySharedDataPointer<StringCallback> callback = m_stringCallbacks.take(requestId))
(*callback)(result);
}
-void QWebEnginePagePrivate::didFetchDocumentInnerText(const QString& result, quint64 requestId)
+void QWebEnginePagePrivate::didFetchDocumentInnerText(quint64 requestId, const QString& result)
{
if (QExplicitlySharedDataPointer<StringCallback> callback = m_stringCallbacks.take(requestId))
(*callback)(result);
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
index 3c136ed6..86605c78 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -84,9 +84,9 @@ public:
virtual bool isFullScreen() const Q_DECL_OVERRIDE { return false; };
virtual void javascriptDialog(QSharedPointer<JavaScriptDialogController>) Q_DECL_OVERRIDE;
virtual void runFileChooser(FileChooserMode, const QString &defaultFileName, const QStringList &acceptedMimeTypes) Q_DECL_OVERRIDE;
- virtual void didRunJavaScript(const QVariant& result, quint64 requestId) Q_DECL_OVERRIDE;
- virtual void didFetchDocumentMarkup(const QString& result, quint64 requestId) Q_DECL_OVERRIDE;
- virtual void didFetchDocumentInnerText(const QString& result, quint64 requestId) Q_DECL_OVERRIDE;
+ virtual void didRunJavaScript(quint64 requestId, const QVariant& result) Q_DECL_OVERRIDE;
+ virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
+ virtual void didFetchDocumentInnerText(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
virtual void passOnFocus(bool reverse) Q_DECL_OVERRIDE { Q_UNUSED(reverse); };
virtual void javaScriptConsoleMessage(int level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;