| 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 "ppapi/proxy/ppapi_proxy_test.h" | 5 #include "ppapi/proxy/ppapi_proxy_test.h" |
| 6 | 6 |
| 7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "ipc/ipc_sync_channel.h" | 9 #include "ipc/ipc_sync_channel.h" |
| 10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 ProxyTestHarnessBase::~ProxyTestHarnessBase() { | 99 ProxyTestHarnessBase::~ProxyTestHarnessBase() { |
| 100 get_interface_handlers_.RemoveObserver(this); | 100 get_interface_handlers_.RemoveObserver(this); |
| 101 } | 101 } |
| 102 | 102 |
| 103 const void* ProxyTestHarnessBase::GetInterface(const char* name) { | 103 const void* ProxyTestHarnessBase::GetInterface(const char* name) { |
| 104 return registered_interfaces_[name]; | 104 return registered_interfaces_[name]; |
| 105 } | 105 } |
| 106 | 106 |
| 107 void ProxyTestHarnessBase::RegisterTestInterface(const char* name, | 107 void ProxyTestHarnessBase::RegisterTestInterface(const char* name, |
| 108 const void* interface) { | 108 const void* test_interface) { |
| 109 registered_interfaces_[name] = interface; | 109 registered_interfaces_[name] = test_interface; |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool ProxyTestHarnessBase::SupportsInterface(const char* name) { | 112 bool ProxyTestHarnessBase::SupportsInterface(const char* name) { |
| 113 sink().ClearMessages(); | 113 sink().ClearMessages(); |
| 114 | 114 |
| 115 // IPC doesn't actually write to this when we send a message manually | 115 // IPC doesn't actually write to this when we send a message manually |
| 116 // not actually using IPC. | 116 // not actually using IPC. |
| 117 bool unused_result = false; | 117 bool unused_result = false; |
| 118 PpapiMsg_SupportsInterface msg(name, &unused_result); | 118 PpapiMsg_SupportsInterface msg(name, &unused_result); |
| 119 GetDispatcher()->OnMessageReceived(msg); | 119 GetDispatcher()->OnMessageReceived(msg); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 remote_harness_torn_down.Wait(); | 368 remote_harness_torn_down.Wait(); |
| 369 | 369 |
| 370 local_harness_->TearDownHarness(); | 370 local_harness_->TearDownHarness(); |
| 371 | 371 |
| 372 io_thread_.Stop(); | 372 io_thread_.Stop(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 | 375 |
| 376 } // namespace proxy | 376 } // namespace proxy |
| 377 } // namespace ppapi | 377 } // namespace ppapi |
| OLD | NEW |