dom/ipc/ContentProcess.h

changeset 2
7e26c7da4463
equal deleted inserted replaced
-1:000000000000 0:bbd9a760427f
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set sw=4 ts=8 et tw=80 :
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #ifndef dom_tabs_ContentThread_h
8 #define dom_tabs_ContentThread_h 1
9
10 #include "mozilla/ipc/ProcessChild.h"
11 #include "mozilla/ipc/ScopedXREEmbed.h"
12 #include "ContentChild.h"
13
14 #undef _MOZ_LOG
15 #define _MOZ_LOG(s) printf("[ContentProcess] %s", s)
16
17 namespace mozilla {
18 namespace dom {
19
20 /**
21 * ContentProcess is a singleton on the content process which represents
22 * the main thread where tab instances live.
23 */
24 class ContentProcess : public mozilla::ipc::ProcessChild
25 {
26 typedef mozilla::ipc::ProcessChild ProcessChild;
27
28 public:
29 ContentProcess(ProcessHandle mParentHandle)
30 : ProcessChild(mParentHandle)
31 { }
32
33 ~ContentProcess()
34 { }
35
36 virtual bool Init() MOZ_OVERRIDE;
37 virtual void CleanUp() MOZ_OVERRIDE;
38
39 void SetAppDir(const nsACString& aPath);
40
41 private:
42 ContentChild mContent;
43 mozilla::ipc::ScopedXREEmbed mXREEmbed;
44
45 DISALLOW_EVIL_CONSTRUCTORS(ContentProcess);
46 };
47
48 } // namespace dom
49 } // namespace mozilla
50
51 #endif // ifndef dom_tabs_ContentThread_h

mercurial