Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/ipc/IOThreadChild.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 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_plugins_IOThreadChild_h
8
#define dom_plugins_IOThreadChild_h 1
9
10
#include "chrome/common/child_thread.h"
11
12
namespace mozilla {
13
namespace ipc {
14
//-----------------------------------------------------------------------------
15
16
// The IOThreadChild class represents a background thread where the
17
// IPC IO MessageLoop lives.
18
class IOThreadChild : public ChildThread {
19
public:
20
  IOThreadChild()
21
    : ChildThread(base::Thread::Options(MessageLoop::TYPE_IO,
22
                                        0)) // stack size
23
0
  { }
24
25
  ~IOThreadChild()
26
0
  { }
27
28
0
  static MessageLoop* message_loop() {
29
0
    return IOThreadChild::current()->Thread::message_loop();
30
0
  }
31
32
  // IOThreadChild owns the returned IPC::Channel.
33
0
  static IPC::Channel* channel() {
34
0
    return IOThreadChild::current()->ChildThread::channel();
35
0
  }
36
37
protected:
38
0
  static IOThreadChild* current() {
39
0
    return static_cast<IOThreadChild*>(ChildThread::current());
40
0
  }
41
42
private:
43
  DISALLOW_EVIL_CONSTRUCTORS(IOThreadChild);
44
};
45
46
} // namespace ipc
47
} // namespace mozilla
48
49
#endif  // ifndef dom_plugins_IOThreadChild_h