1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/ipc/ContentProcess.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,51 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * vim: set sw=4 ts=8 et tw=80 : 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef dom_tabs_ContentThread_h 1.11 +#define dom_tabs_ContentThread_h 1 1.12 + 1.13 +#include "mozilla/ipc/ProcessChild.h" 1.14 +#include "mozilla/ipc/ScopedXREEmbed.h" 1.15 +#include "ContentChild.h" 1.16 + 1.17 +#undef _MOZ_LOG 1.18 +#define _MOZ_LOG(s) printf("[ContentProcess] %s", s) 1.19 + 1.20 +namespace mozilla { 1.21 +namespace dom { 1.22 + 1.23 +/** 1.24 + * ContentProcess is a singleton on the content process which represents 1.25 + * the main thread where tab instances live. 1.26 + */ 1.27 +class ContentProcess : public mozilla::ipc::ProcessChild 1.28 +{ 1.29 + typedef mozilla::ipc::ProcessChild ProcessChild; 1.30 + 1.31 +public: 1.32 + ContentProcess(ProcessHandle mParentHandle) 1.33 + : ProcessChild(mParentHandle) 1.34 + { } 1.35 + 1.36 + ~ContentProcess() 1.37 + { } 1.38 + 1.39 + virtual bool Init() MOZ_OVERRIDE; 1.40 + virtual void CleanUp() MOZ_OVERRIDE; 1.41 + 1.42 + void SetAppDir(const nsACString& aPath); 1.43 + 1.44 +private: 1.45 + ContentChild mContent; 1.46 + mozilla::ipc::ScopedXREEmbed mXREEmbed; 1.47 + 1.48 + DISALLOW_EVIL_CONSTRUCTORS(ContentProcess); 1.49 +}; 1.50 + 1.51 +} // namespace dom 1.52 +} // namespace mozilla 1.53 + 1.54 +#endif // ifndef dom_tabs_ContentThread_h