Skip to content

Commit f1ca2c5

Browse files
committed
added GetViewTypeName() method
1 parent eb00798 commit f1ca2c5

13 files changed

+41
-1
lines changed

inc/extension_qt/graphics_web_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class GraphicsWebViewCmdExecutorCreator : public ViewCmdExecutorCreator {
2626

2727
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2828
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
29+
virtual std::string GetViewTypeName() const;
30+
2931
private:
3032

3133
DISALLOW_COPY_AND_ASSIGN(GraphicsWebViewCmdExecutorCreator);

inc/extension_qt/qml_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class QQmlViewCmdExecutorCreator : public ViewCmdExecutorCreator {
1919

2020
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2121
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
22+
virtual std::string GetViewTypeName() const;
23+
2224
private:
2325

2426
DISALLOW_COPY_AND_ASSIGN(QQmlViewCmdExecutorCreator);

inc/extension_qt/qml_web_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class QmlWebViewCmdExecutorCreator : public ViewCmdExecutorCreator {
2727

2828
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2929
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
30+
virtual std::string GetViewTypeName() const;
31+
3032
private:
3133

3234
DISALLOW_COPY_AND_ASSIGN(QmlWebViewCmdExecutorCreator);

inc/extension_qt/quick2_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class Quick2ViewCmdExecutorCreator : public ViewCmdExecutorCreator {
1919

2020
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2121
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
22+
virtual std::string GetViewTypeName() const;
23+
2224
private:
2325

2426
DISALLOW_COPY_AND_ASSIGN(Quick2ViewCmdExecutorCreator);

inc/extension_qt/web_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class QWebViewCmdExecutorCreator : public ViewCmdExecutorCreator {
2828

2929
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
3030
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
31+
virtual std::string GetViewTypeName() const;
32+
3133
private:
3234

3335
DISALLOW_COPY_AND_ASSIGN(QWebViewCmdExecutorCreator);

inc/extension_qt/widget_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class QWidgetViewCmdExecutorCreator : public ViewCmdExecutorCreator {
6666

6767
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
6868
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
69+
virtual std::string GetViewTypeName() const;
70+
6971
private:
7072

7173
DISALLOW_COPY_AND_ASSIGN(QWidgetViewCmdExecutorCreator);

inc/webdriver_view_executor.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ class ViewCmdExecutorCreator {
198198
/// @param[out] viewType returned type of view
199199
/// @return true - if there is executor for such view
200200
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const = 0;
201+
202+
/// @return supported view type for current executor
203+
virtual std::string GetViewTypeName() const = 0;
204+
201205
private:
202206

203207
DISALLOW_COPY_AND_ASSIGN(ViewCmdExecutorCreator);

src/webdriver/extension_qt/graphics_web_view_executor.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ bool GraphicsWebViewCmdExecutorCreator::CanHandleView(Session* session, ViewId v
7070
}
7171

7272
return false;
73-
}
73+
}
74+
75+
std::string GraphicsWebViewCmdExecutorCreator::GetViewTypeName() const {
76+
return "graphicsWebView";
77+
}
7478

7579
GraphicsWebViewCmdExecutor::GraphicsWebViewCmdExecutor(Session* session, ViewId viewId)
7680
: ViewCmdExecutor(session, viewId) {

src/webdriver/extension_qt/qml_view_executor.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ bool QQmlViewCmdExecutorCreator::CanHandleView(Session* session, ViewId viewId,
6161
return false;
6262
}
6363

64+
std::string QQmlViewCmdExecutorCreator::GetViewTypeName() const {
65+
return "qml";
66+
}
67+
6468
QQmlViewCmdExecutor::QQmlViewCmdExecutor(Session* session, ViewId viewId)
6569
: QViewCmdExecutor(session, viewId) {
6670
}

src/webdriver/extension_qt/qml_web_view_executor.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ bool QmlWebViewCmdExecutorCreator::CanHandleView(Session* session, ViewId viewId
7878
return false;
7979
}
8080

81+
std::string QmlWebViewCmdExecutorCreator::GetViewTypeName() const {
82+
return "qmlweb";
83+
}
84+
8185
QmlWebViewCmdExecutor::QmlWebViewCmdExecutor(Session* session, ViewId viewId)
8286
: ViewCmdExecutor(session, viewId) {
8387

0 commit comments

Comments
 (0)