| 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 | 4 |
| 5 #include <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // RegisterTestInterface(); | 69 // RegisterTestInterface(); |
| 70 const void* GetInterface(const char* name); | 70 const void* GetInterface(const char* name); |
| 71 | 71 |
| 72 // Allows the test to specify an interface implementation for a given | 72 // Allows the test to specify an interface implementation for a given |
| 73 // interface name. This will be returned when any of the proxy logic | 73 // interface name. This will be returned when any of the proxy logic |
| 74 // requests a local interface. | 74 // requests a local interface. |
| 75 void RegisterTestInterface(const char* name, const void* test_interface); | 75 void RegisterTestInterface(const char* name, const void* test_interface); |
| 76 | 76 |
| 77 // Sends a "supports interface" message to the current dispatcher and returns | 77 // Sends a "supports interface" message to the current dispatcher and returns |
| 78 // true if it's supported. This is just for the convenience of tests. | 78 // true if it's supported. This is just for the convenience of tests. |
| 79 bool IsInterfaceSupported(const char* name); | 79 bool SupportsInterface(const char* name); |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 // Destination for IPC messages sent by the test. | 82 // Destination for IPC messages sent by the test. |
| 83 ResourceMessageTestSink sink_; | 83 ResourceMessageTestSink sink_; |
| 84 | 84 |
| 85 // The module and instance ID associated with the plugin dispatcher. | 85 // The module and instance ID associated with the plugin dispatcher. |
| 86 PP_Module pp_module_; | 86 PP_Module pp_module_; |
| 87 PP_Instance pp_instance_; | 87 PP_Instance pp_instance_; |
| 88 | 88 |
| 89 // Stores the data for GetInterface/RegisterTestInterface. | 89 // Stores the data for GetInterface/RegisterTestInterface. |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 // EXPECT_VAR_IS_STRING("foo", my_var); | 359 // EXPECT_VAR_IS_STRING("foo", my_var); |
| 360 #define EXPECT_VAR_IS_STRING(str, var) { \ | 360 #define EXPECT_VAR_IS_STRING(str, var) { \ |
| 361 StringVar* sv = StringVar::FromPPVar(var); \ | 361 StringVar* sv = StringVar::FromPPVar(var); \ |
| 362 EXPECT_TRUE(sv); \ | 362 EXPECT_TRUE(sv); \ |
| 363 if (sv) \ | 363 if (sv) \ |
| 364 EXPECT_EQ(str, sv->value()); \ | 364 EXPECT_EQ(str, sv->value()); \ |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace proxy | 367 } // namespace proxy |
| 368 } // namespace ppapi | 368 } // namespace ppapi |
| OLD | NEW |