Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: experimental/c_salt/integration_tests/test_module.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Ginsu 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 #ifndef C_SALT_INTEGRATION_TESTS_TEST_MODULE_H_
6 #define C_SALT_INTEGRATION_TESTS_TEST_MODULE_H_
7
8 #include <cstdio>
9
10 #include "boost/shared_ptr.hpp"
11 #include "c_salt/integration_tests/fake_instance.h"
12 #include "c_salt/module.h"
13
14 // This is the connection to the c_salt Module machinery. The Module singleton
15 // calls CreateInstance to make new copies of each in-browser instance of
16 // FakeInstance.
17 class TestModule : public c_salt::Module {
18 public:
19 virtual c_salt::Instance* CreateInstance(const NPP& npp_instance) {
20 std::printf("Creating instance %p\n", npp_instance);
21 boost::shared_ptr<FakeInstance> instance_ptr(
22 new FakeInstance(npp_instance));
23 // The ScriptingBridge takes ownership of FakeInstance via the shared_ptr.
24 instance_ptr->CreateScriptingBridgeForObject(instance_ptr);
25 return instance_ptr.get();
26 }
27 };
28
29 #endif // C_SALT_INTEGRATION_TESTS_TEST_MODULE_H_
OLDNEW
« no previous file with comments | « experimental/c_salt/integration_tests/property_tester.cc ('k') | experimental/c_salt/integration_tests/test_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698