blob: 7082967e8a4c75bc9237546ccc611574ee984261 [file] [log] [blame]
[email protected]7326c2a2014-05-19 08:11:311// 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
5#include "base/at_exit.h"
6#include "base/compiler_specific.h"
7#include "ppapi/cpp/instance.h"
8#include "ppapi/cpp/module.h"
9#include "remoting/client/plugin/chromoting_instance.h"
10
11namespace remoting {
12
13class ChromotingModule : public pp::Module {
14 protected:
nick697f4292015-04-23 18:22:3115 pp::Instance* CreateInstance(PP_Instance instance) override {
[email protected]7326c2a2014-05-19 08:11:3116 pp::Instance* result = new ChromotingInstance(instance);
17 return result;
18 }
19 private:
20 base::AtExitManager at_exit_manager_;
21};
22
23} // namespace remoting
24
25namespace pp {
26
27// Factory function for your specialization of the Module object.
28Module* CreateModule() {
29 return new remoting::ChromotingModule();
30}
31
32} // namespace pp