| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #include "gtest_ppapi/gtest_module.h" |
| 4 #include "gtest_ppapi/gtest_instance.h" | 5 #include "gtest_ppapi/gtest_instance.h" |
| 5 #include "ppapi/cpp/module.h" | |
| 6 | 6 |
| 7 // GTestModule is a NaCl module dedicated to running gtest-based unit tests. | 7 pp::Instance* GTestModule::CreateInstance(PP_Instance instance) { |
| 8 // It creates an NaCl instance based on GTestInstance. | 8 return new GTestInstance(instance); |
| 9 class GTestModule : public pp::Module { | |
| 10 public: | |
| 11 GTestModule() : pp::Module() {} | |
| 12 ~GTestModule() {} | |
| 13 | |
| 14 virtual pp::Instance* CreateInstance(PP_Instance instance) { | |
| 15 return new GTestInstance(instance); | |
| 16 } | |
| 17 }; | |
| 18 | |
| 19 namespace pp { | |
| 20 | |
| 21 Module* CreateModule() { | |
| 22 return new GTestModule(); | |
| 23 } | 9 } |
| 24 | |
| 25 } // namespace pp | |
| OLD | NEW |