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

Side by Side Diff: native_client_sdk/src/libraries/nacl_mounts_test/pepper_interface_mock.cc

Issue 12194030: Rename mount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix c file. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 #include "pepper_interface_mock.h"
7
8 PepperInterfaceMock::PepperInterfaceMock(PP_Instance instance)
9 : instance_(instance),
10
11 // Initialize interfaces.
12 #include "nacl_mounts/pepper/define_empty_macros.h"
13 #undef BEGIN_INTERFACE
14 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \
15 BaseClass##interface_(new BaseClass##Mock),
16 #include "nacl_mounts/pepper/all_interfaces.h"
17 #include "nacl_mounts/pepper/undef_macros.h"
18
19 // Dummy value so we can ensure that no interface ends the initializer list.
20 dummy_(0) {
21 }
22
23 PepperInterfaceMock::~PepperInterfaceMock() {
24
25 // Delete interfaces.
26 #include "nacl_mounts/pepper/define_empty_macros.h"
27 #undef BEGIN_INTERFACE
28 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \
29 delete BaseClass##interface_;
30 #include "nacl_mounts/pepper/all_interfaces.h"
31 #include "nacl_mounts/pepper/undef_macros.h"
32
33 }
34
35 PP_Instance PepperInterfaceMock::GetInstance() {
36 return instance_;
37 }
38
39 // Define Getter functions, constructors, destructors.
40 #include "nacl_mounts/pepper/define_empty_macros.h"
41 #undef BEGIN_INTERFACE
42 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \
43 BaseClass##Mock* PepperInterfaceMock::Get##BaseClass() { \
44 return BaseClass##interface_; \
45 } \
46 BaseClass##Mock::BaseClass##Mock() { \
47 } \
48 BaseClass##Mock::~BaseClass##Mock() { \
49 }
50 #include "nacl_mounts/pepper/all_interfaces.h"
51 #include "nacl_mounts/pepper/undef_macros.h"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698