Skip to content

Commit 26edcf0

Browse files
committed
fixed compilation errors
1 parent 55eddbc commit 26edcf0

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

inc/extension_qt/qml_web_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
namespace webdriver {
1515

16+
class QWebkitProxy;
17+
1618
class QmlWebViewCmdExecutorCreator : public ViewCmdExecutorCreator {
1719
public:
1820
static const ViewType QML_WEB_VIEW_TYPE;

src/webdriver/extension_qt/qml_web_view_executor.cc

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -436,19 +436,27 @@ void QmlWebViewCmdExecutor::TouchLongClick(const ElementId& element, Error **err
436436
}
437437

438438
void QmlWebViewCmdExecutor::TouchScroll(const int &xoffset, const int &yoffset, Error **error) {
439-
// TODO:
439+
CHECK_VIEW_EXISTANCE
440+
441+
view_->page()->mainFrame()->scroll(xoffset, yoffset);
440442
}
441443

442444
void QmlWebViewCmdExecutor::TouchScroll(const ElementId &element, const int &xoffset, const int &yoffset, Error **error) {
443-
// TODO:
445+
CHECK_VIEW_EXISTANCE
446+
447+
view_->page()->mainFrame()->scroll(-xoffset, -yoffset);
444448
}
445449

446450
void QmlWebViewCmdExecutor::TouchFlick(const int &xSpeed, const int &ySpeed, Error **error) {
447-
// TODO:
451+
CHECK_VIEW_EXISTANCE
452+
453+
view_->page()->mainFrame()->scroll(xSpeed*3, ySpeed*3);
448454
}
449455

450456
void QmlWebViewCmdExecutor::TouchFlick(const ElementId &element, const int &xoffset, const int &yoffset, const int &speed, Error **error) {
451-
// TODO:
457+
CHECK_VIEW_EXISTANCE
458+
459+
view_->page()->mainFrame()->scroll(-xoffset*(speed+1), -yoffset*(speed+1));
452460
}
453461

454462
void QmlWebViewCmdExecutor::GetBrowserLog(base::ListValue** browserLog, Error **error) {
@@ -457,49 +465,49 @@ void QmlWebViewCmdExecutor::GetBrowserLog(base::ListValue** browserLog, Error **
457465
*error = webkitProxy_->GetBrowserLog(browserLog);
458466
}
459467

460-
void QmlWebViewCmdExecutor::GetPlayerState(const ElementId& element, PlayerState*, Error**) {
468+
void QmlWebViewCmdExecutor::GetPlayerState(const ElementId& element, PlayerState* state, Error** error) {
461469
CHECK_VIEW_EXISTANCE
462470

463471
*error = webkitProxy_->GetPlayerState(element, state);
464472
}
465473

466-
void QmlWebViewCmdExecutor::SetPlayerState(const ElementId& element, PlayerState, Error**) {
474+
void QmlWebViewCmdExecutor::SetPlayerState(const ElementId& element, PlayerState state, Error** error) {
467475
CHECK_VIEW_EXISTANCE
468476

469477
*error = webkitProxy_->SetPlayerState(element, state);
470478
}
471479

472-
void QmlWebViewCmdExecutor::GetPlayerVolume(const ElementId& element, double*, Error**) {
480+
void QmlWebViewCmdExecutor::GetPlayerVolume(const ElementId& element, double* volume, Error** error) {
473481
CHECK_VIEW_EXISTANCE
474482

475483
*error = webkitProxy_->GetPlayerVolume(element, volume);
476484
}
477485

478-
void QmlWebViewCmdExecutor::SetPlayerVolume(const ElementId& element, double, Error**) {
486+
void QmlWebViewCmdExecutor::SetPlayerVolume(const ElementId& element, double volume, Error** error) {
479487
CHECK_VIEW_EXISTANCE
480488

481489
*error = webkitProxy_->SetPlayerVolume(element, volume);
482490
}
483491

484-
void QmlWebViewCmdExecutor::GetPlayingPosition(const ElementId& element, double*, Error**) {
492+
void QmlWebViewCmdExecutor::GetPlayingPosition(const ElementId& element, double* position, Error** error) {
485493
CHECK_VIEW_EXISTANCE
486494

487495
*error = webkitProxy_->GetPlayingPosition(element, position);
488496
}
489497

490-
void QmlWebViewCmdExecutor::SetPlayingPosition(const ElementId& element, double, Error**) {
498+
void QmlWebViewCmdExecutor::SetPlayingPosition(const ElementId& element, double position, Error** error) {
491499
CHECK_VIEW_EXISTANCE
492500

493501
*error = webkitProxy_->SetPlayingPosition(element, position);
494502
}
495503

496-
void QmlWebViewCmdExecutor::SetMute(const ElementId& element, bool, Error**) {
504+
void QmlWebViewCmdExecutor::SetMute(const ElementId& element, bool mute, Error** error) {
497505
CHECK_VIEW_EXISTANCE
498506

499507
*error = webkitProxy_->SetMute(element, mute);
500508
}
501509

502-
void QmlWebViewCmdExecutor::GetMute(const ElementId& element, bool*, Error**) {
510+
void QmlWebViewCmdExecutor::GetMute(const ElementId& element, bool* mute, Error** error) {
503511
CHECK_VIEW_EXISTANCE
504512

505513
*error = webkitProxy_->GetMute(element, mute);

0 commit comments

Comments
 (0)