~osomon/oxide/ensure-files-exist

« back to all changes in this revision

Viewing changes to qt/quick/api/oxideqquickwebcontextdelegateworker_p_p.h

  • Committer: Olivier Tilloy
  • Date: 2014-09-25 16:27:09 UTC
  • mfrom: (677.1.95 oxide)
  • Revision ID: olivier.tilloy@canonical.com-20140925162709-h8bai0f1nfaf7cfy
Merge the latest changes from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include <QObject>
22
22
#include <QScopedPointer>
 
23
#include <QSharedPointer>
23
24
#include <QtGlobal>
24
25
#include <QUrl>
25
26
 
28
29
class OxideQStoragePermissionRequest;
29
30
class OxideQQuickWebContextDelegateWorker;
30
31
 
 
32
QT_BEGIN_NAMESPACE
 
33
class QVariant;
 
34
QT_END_NAMESPACE
 
35
 
31
36
namespace oxide {
32
37
namespace qquick {
33
 
 
34
 
class WebContextDelegateWorkerHelperThreadController;
35
 
class WebContextDelegateWorkerUIThreadController;
36
 
 
37
 
class WebContextDelegateWorkerIOThreadController : public QObject {
 
38
namespace webcontextdelegateworker {
 
39
 
 
40
class HelperThreadController;
 
41
 
 
42
class IOThreadController Q_DECL_FINAL : public QObject {
38
43
  Q_OBJECT
39
44
 
40
45
 public:
41
 
  WebContextDelegateWorkerIOThreadController();
42
 
  virtual ~WebContextDelegateWorkerIOThreadController();
 
46
  IOThreadController(
 
47
      const QSharedPointer<HelperThreadController>& helper_thread_controller);
 
48
  virtual ~IOThreadController();
43
49
 
44
50
 Q_SIGNALS:
45
51
  void callEntryPointInWorker(const QString& entry, QObject* data);
 
52
 
 
53
 private:
 
54
  QSharedPointer<HelperThreadController> ht_controller_;
46
55
};
47
56
 
48
57
}
49
58
}
50
 
 
51
 
class OxideQQuickWebContextDelegateWorkerPrivate Q_DECL_FINAL {
 
59
}
 
60
 
 
61
class OxideQQuickWebContextDelegateWorkerPrivate Q_DECL_FINAL :
 
62
    public QObject {
 
63
  Q_OBJECT
 
64
 
52
65
 public:
53
66
  ~OxideQQuickWebContextDelegateWorkerPrivate();
54
67
 
55
68
  static OxideQQuickWebContextDelegateWorkerPrivate* get(
56
69
      OxideQQuickWebContextDelegateWorker* q);
57
70
 
58
 
  QScopedPointer<oxide::qquick::WebContextDelegateWorkerIOThreadController>
59
 
      io_thread_controller;
 
71
  QSharedPointer<oxide::qquick::webcontextdelegateworker::IOThreadController>
 
72
      io_thread_controller() const { return io_thread_controller_; }
 
73
 
 
74
  void incAttachedCount() { attached_count_++; }
 
75
  bool decAttachedCount() {
 
76
    Q_ASSERT(attached_count_ > 0);
 
77
    return --attached_count_ == 0;
 
78
  }
 
79
 
 
80
  bool in_destruction() const { return in_destruction_; }
 
81
 
 
82
 Q_SIGNALS:
 
83
  void runScript(const QUrl& source);
 
84
  void sendMessage(const QVariant& message);
60
85
 
61
86
 private:
62
87
  friend class OxideQQuickWebContextDelegateWorker;
66
91
  bool constructed_;
67
92
  QUrl source_;
68
93
 
69
 
  oxide::qquick::WebContextDelegateWorkerHelperThreadController*
 
94
  unsigned attached_count_;
 
95
  bool in_destruction_;
 
96
 
 
97
  QSharedPointer<oxide::qquick::webcontextdelegateworker::HelperThreadController>
70
98
      helper_thread_controller_;
71
 
  QScopedPointer<oxide::qquick::WebContextDelegateWorkerUIThreadController>
72
 
      ui_thread_controller_;
 
99
  QSharedPointer<oxide::qquick::webcontextdelegateworker::IOThreadController>
 
100
      io_thread_controller_;
73
101
};
74
102
 
75
103
#endif // _OXIDE_QT_QUICK_API_WEB_CONTEXT_DELEGATE_WORKER_P_P_H_