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

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/fake_messaging_interface.h

Issue 137853023: [NaCl SDK] nacl_io: Add new fakes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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) 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 #ifndef TESTS_NACL_IO_TEST_FAKE_MESSAGING_INTERFACE_H_
6 #define TESTS_NACL_IO_TEST_FAKE_MESSAGING_INTERFACE_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "nacl_io/pepper_interface.h"
12 #include "sdk_util/macros.h"
13
14 class FakeVarManager;
15
16 // Fake version of the MessagingInterface which simply records any
17 // messages sent to it via PostMessage and makes them available as
18 // a std::vector of std::string.
19 class FakeMessagingInterface : public nacl_io::MessagingInterface {
20 public:
21 explicit FakeMessagingInterface(FakeVarManager* manager,
binji 2014/01/17 01:31:14 remove explicit for 2 arg constructor
Sam Clegg 2014/01/17 22:40:11 Done.
22 nacl_io::VarInterface* var_interface);
23 ~FakeMessagingInterface();
24
25 virtual void PostMessage(PP_Instance instance, PP_Var message);
26
27 std::vector<PP_Var> messages;
28 private:
29 FakeVarManager* manager_;
30 nacl_io::VarInterface* var_interface_;
31 DISALLOW_COPY_AND_ASSIGN(FakeMessagingInterface);
32 };
33
34 #endif // TESTS_NACL_IO_TEST_FAKE_MESSAGING_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698