mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Move MoonlightInstance declaration into a header
This commit is contained in:
parent
8bd27fcf3c
commit
b5b6329c9d
16
main.cpp
16
main.cpp
@ -1,17 +1,6 @@
|
||||
#include "ppapi/cpp/instance.h"
|
||||
#include "ppapi/cpp/module.h"
|
||||
#include "ppapi/cpp/var.h"
|
||||
#include "moonlight.hpp"
|
||||
|
||||
#include "nacl_io/nacl_io.h"
|
||||
|
||||
class MoonlightInstance : public pp::Instance {
|
||||
public:
|
||||
explicit MoonlightInstance(PP_Instance instance) : pp::Instance(instance) {
|
||||
// This function MUST be used otherwise sockets don't work (nacl_io_init() doesn't work!)
|
||||
nacl_io_init_ppapi(pp_instance(), pp::Module::Get()->get_browser_interface());
|
||||
}
|
||||
virtual ~MoonlightInstance() {}
|
||||
};
|
||||
MoonlightInstance::~MoonlightInstance() {}
|
||||
|
||||
class MoonlightModule : public pp::Module {
|
||||
public:
|
||||
@ -25,7 +14,6 @@ class MoonlightModule : public pp::Module {
|
||||
|
||||
namespace pp {
|
||||
Module* CreateModule() {
|
||||
|
||||
return new MoonlightModule();
|
||||
}
|
||||
} // namespace pp
|
15
moonlight.hpp
Normal file
15
moonlight.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "ppapi/cpp/instance.h"
|
||||
#include "ppapi/cpp/module.h"
|
||||
#include "ppapi/cpp/var.h"
|
||||
|
||||
#include "nacl_io/nacl_io.h"
|
||||
|
||||
class MoonlightInstance : public pp::Instance {
|
||||
public:
|
||||
explicit MoonlightInstance(PP_Instance instance) : pp::Instance(instance) {
|
||||
// This function MUST be used otherwise sockets don't work (nacl_io_init() doesn't work!)
|
||||
nacl_io_init_ppapi(pp_instance(), pp::Module::Get()->get_browser_interface());
|
||||
}
|
||||
|
||||
virtual ~MoonlightInstance();
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user