Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 21 lines (15 sloc) 0.553 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include "GetWindowHandles.h"
#include "WebPageManager.h"
#include "CommandFactory.h"
#include "WebPage.h"
#include <QStringList>

GetWindowHandles::GetWindowHandles(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
}

void GetWindowHandles::start() {
  QString handles = "[";
  QStringList stringList;

  foreach(WebPage *page, manager()->pages())
    stringList.append("\"" + page->uuid() + "\"");

  handles += stringList.join(",") + "]";

  emit finished(new Response(true, handles));
}
Something went wrong with that request. Please try again.