nacl_trusted_listener.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_NACL_LOADER_NACL_TRUSTED_LISTENER_H_
  5. #define COMPONENTS_NACL_LOADER_NACL_TRUSTED_LISTENER_H_
  6. #include "components/nacl/common/nacl.mojom.h"
  7. #include "mojo/public/cpp/bindings/pending_remote.h"
  8. #include "mojo/public/cpp/bindings/remote.h"
  9. namespace base {
  10. class SingleThreadTaskRunner;
  11. }
  12. class NaClTrustedListener {
  13. public:
  14. NaClTrustedListener(
  15. mojo::PendingRemote<nacl::mojom::NaClRendererHost> renderer_host,
  16. base::SingleThreadTaskRunner* io_task_runner);
  17. NaClTrustedListener(const NaClTrustedListener&) = delete;
  18. NaClTrustedListener& operator=(const NaClTrustedListener&) = delete;
  19. ~NaClTrustedListener();
  20. nacl::mojom::NaClRendererHost* renderer_host() {
  21. return renderer_host_.get();
  22. }
  23. private:
  24. mojo::Remote<nacl::mojom::NaClRendererHost> renderer_host_;
  25. };
  26. #endif // COMPONENTS_NACL_LOADER_NACL_TRUSTED_LISTENER_H_