| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 virtual void TearDownHarness() = 0; | 46 virtual void TearDownHarness() = 0; |
| 47 | 47 |
| 48 // Implementation of GetInterface for the dispatcher. This will | 48 // Implementation of GetInterface for the dispatcher. This will |
| 49 // return NULL for all interfaces unless one is registered by calling | 49 // return NULL for all interfaces unless one is registered by calling |
| 50 // RegisterTestInterface(); | 50 // RegisterTestInterface(); |
| 51 const void* GetInterface(const char* name); | 51 const void* GetInterface(const char* name); |
| 52 | 52 |
| 53 // Allows the test to specify an interface implementation for a given | 53 // Allows the test to specify an interface implementation for a given |
| 54 // interface name. This will be returned when any of the proxy logic | 54 // interface name. This will be returned when any of the proxy logic |
| 55 // requests a local interface. | 55 // requests a local interface. |
| 56 void RegisterTestInterface(const char* name, const void* interface); | 56 void RegisterTestInterface(const char* name, const void* test_interface); |
| 57 | 57 |
| 58 // Sends a "supports interface" message to the current dispatcher and returns | 58 // Sends a "supports interface" message to the current dispatcher and returns |
| 59 // true if it's supported. This is just for the convenience of tests. | 59 // true if it's supported. This is just for the convenience of tests. |
| 60 bool SupportsInterface(const char* name); | 60 bool SupportsInterface(const char* name); |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 // Destination for IPC messages sent by the test. | 63 // Destination for IPC messages sent by the test. |
| 64 IPC::TestSink sink_; | 64 IPC::TestSink sink_; |
| 65 | 65 |
| 66 // The module and instance ID associated with the plugin dispatcher. | 66 // The module and instance ID associated with the plugin dispatcher. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // stopping the harnesses. | 234 // stopping the harnesses. |
| 235 ProxyTestHarnessBase* remote_harness_; | 235 ProxyTestHarnessBase* remote_harness_; |
| 236 ProxyTestHarnessBase* local_harness_; | 236 ProxyTestHarnessBase* local_harness_; |
| 237 | 237 |
| 238 base::WaitableEvent channel_created_; | 238 base::WaitableEvent channel_created_; |
| 239 base::WaitableEvent shutdown_event_; | 239 base::WaitableEvent shutdown_event_; |
| 240 }; | 240 }; |
| 241 | 241 |
| 242 } // namespace proxy | 242 } // namespace proxy |
| 243 } // namespace ppapi | 243 } // namespace ppapi |
| OLD | NEW |