QV8DebugService: Simplify the service code
[profile/ivi/qtdeclarative.git] / src / declarative / debugger / qv8debugservice_p.h
index 754ae53..9430f95 100644 (file)
@@ -54,7 +54,6 @@
 //
 
 #include "qdeclarativedebugservice_p.h"
-#include <private/qv8_p.h>
 
 QT_BEGIN_HEADER
 
@@ -62,7 +61,7 @@ QT_BEGIN_NAMESPACE
 
 QT_MODULE(Declarative)
 
-class QDeclarativeEngine;
+class QV8Engine;
 class QV8DebugServicePrivate;
 
 class QV8DebugService : public QDeclarativeDebugService
@@ -73,24 +72,28 @@ public:
     ~QV8DebugService();
 
     static QV8DebugService *instance();
-    static void initialize();
+    static void initialize(const QV8Engine *engine);
 
-    void debugMessageHandler(const QString &message, bool willStartRunning);
-
-    void appendSourcePath(const v8::Handle<v8::Object> &eventData);
+    void debugMessageHandler(const QString &message);
 
     void signalEmitted(const QString &signal);
 
+public slots:
+    void processDebugMessages();
+
 private slots:
-    void scheduledDebugBreak();
-    void cancelDebugBreak();
-    void initialize(bool);
+    void scheduledDebugBreak(bool schedule);
+    void sendDebugMessage(const QString &message);
+    void init();
 
 protected:
     void statusChanged(Status newStatus);
     void messageReceived(const QByteArray &);
 
 private:
+    void setEngine(const QV8Engine *engine);
+
+private:
     Q_DISABLE_COPY(QV8DebugService)
     Q_DECLARE_PRIVATE(QV8DebugService)
 };