1563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark/* 2563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 4563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 5563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * Redistribution and use in source and binary forms, with or without 6563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * modification, are permitted provided that the following conditions 7563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * are met: 8563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 9563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 1. Redistributions of source code must retain the above copyright 10563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * notice, this list of conditions and the following disclaimer. 11563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 2. Redistributions in binary form must reproduce the above copyright 12563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * notice, this list of conditions and the following disclaimer in the 13563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * documentation and/or other materials provided with the distribution. 14563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 15563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * its contributors may be used to endorse or promote products derived 16563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * from this software without specific prior written permission. 17563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 18563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 19563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 22563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark */ 29d0825bca7fe65beaee391d30da42e937db621564Steve Block#ifndef GCControllerQt_h 30d0825bca7fe65beaee391d30da42e937db621564Steve Block#define GCControllerQt_h 31563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 32cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block#include <QObject> 33563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 34563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkclass QWebPage; 35dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockclass DumpRenderTreeSupportQt; 36563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 370bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochclass GCController : public QObject 380bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch{ 390bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch Q_OBJECT 400bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochpublic: 410bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch GCController(QWebPage* parent); 420bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 430bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochpublic slots: 440bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void collect() const; 450bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void collectOnAlternateThread(bool waitUntilDone) const; 46a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch unsigned int getJSObjectCount() const; 47dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block 480bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch}; 490bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 50563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif 51