| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 base::WaitableEvent* shutdown_event) { | 126 base::WaitableEvent* shutdown_event) { |
| 127 ipc_message_loop_ = ipc_message_loop; | 127 ipc_message_loop_ = ipc_message_loop; |
| 128 shutdown_event_ = shutdown_event; | 128 shutdown_event_ = shutdown_event; |
| 129 } | 129 } |
| 130 | 130 |
| 131 void set_browser_sender(IPC::Sender* browser_sender) { | 131 void set_browser_sender(IPC::Sender* browser_sender) { |
| 132 browser_sender_ = browser_sender; | 132 browser_sender_ = browser_sender; |
| 133 } | 133 } |
| 134 | 134 |
| 135 // ProxyChannel::Delegate implementation. | 135 // ProxyChannel::Delegate implementation. |
| 136 base::MessageLoopProxy* GetIPCMessageLoop() override; | 136 base::SingleThreadTaskRunner* GetIPCTaskRunner() override; |
| 137 base::WaitableEvent* GetShutdownEvent() override; | 137 base::WaitableEvent* GetShutdownEvent() override; |
| 138 IPC::PlatformFileForTransit ShareHandleWithRemote( | 138 IPC::PlatformFileForTransit ShareHandleWithRemote( |
| 139 base::PlatformFile handle, | 139 base::PlatformFile handle, |
| 140 base::ProcessId remote_pid, | 140 base::ProcessId remote_pid, |
| 141 bool should_close_source) override; | 141 bool should_close_source) override; |
| 142 | 142 |
| 143 // PluginDispatcher::PluginDelegate implementation. | 143 // PluginDispatcher::PluginDelegate implementation. |
| 144 std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override; | 144 std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override; |
| 145 uint32 Register(PluginDispatcher* plugin_dispatcher) override; | 145 uint32 Register(PluginDispatcher* plugin_dispatcher) override; |
| 146 void Unregister(uint32 plugin_dispatcher_id) override; | 146 void Unregister(uint32 plugin_dispatcher_id) override; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 } | 266 } |
| 267 ~DelegateMock() override {} | 267 ~DelegateMock() override {} |
| 268 | 268 |
| 269 void Init(base::MessageLoopProxy* ipc_message_loop, | 269 void Init(base::MessageLoopProxy* ipc_message_loop, |
| 270 base::WaitableEvent* shutdown_event) { | 270 base::WaitableEvent* shutdown_event) { |
| 271 ipc_message_loop_ = ipc_message_loop; | 271 ipc_message_loop_ = ipc_message_loop; |
| 272 shutdown_event_ = shutdown_event; | 272 shutdown_event_ = shutdown_event; |
| 273 } | 273 } |
| 274 | 274 |
| 275 // ProxyChannel::Delegate implementation. | 275 // ProxyChannel::Delegate implementation. |
| 276 base::MessageLoopProxy* GetIPCMessageLoop() override; | 276 base::MessageLoopProxy* GetIPCTaskRunner() override; |
| 277 base::WaitableEvent* GetShutdownEvent() override; | 277 base::WaitableEvent* GetShutdownEvent() override; |
| 278 IPC::PlatformFileForTransit ShareHandleWithRemote( | 278 IPC::PlatformFileForTransit ShareHandleWithRemote( |
| 279 base::PlatformFile handle, | 279 base::PlatformFile handle, |
| 280 base::ProcessId remote_pid, | 280 base::ProcessId remote_pid, |
| 281 bool should_close_source) override; | 281 bool should_close_source) override; |
| 282 | 282 |
| 283 private: | 283 private: |
| 284 base::MessageLoopProxy* ipc_message_loop_; // Weak | 284 base::MessageLoopProxy* ipc_message_loop_; // Weak |
| 285 base::WaitableEvent* shutdown_event_; // Weak | 285 base::WaitableEvent* shutdown_event_; // Weak |
| 286 | 286 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // EXPECT_VAR_IS_STRING("foo", my_var); | 365 // EXPECT_VAR_IS_STRING("foo", my_var); |
| 366 #define EXPECT_VAR_IS_STRING(str, var) { \ | 366 #define EXPECT_VAR_IS_STRING(str, var) { \ |
| 367 StringVar* sv = StringVar::FromPPVar(var); \ | 367 StringVar* sv = StringVar::FromPPVar(var); \ |
| 368 EXPECT_TRUE(sv); \ | 368 EXPECT_TRUE(sv); \ |
| 369 if (sv) \ | 369 if (sv) \ |
| 370 EXPECT_EQ(str, sv->value()); \ | 370 EXPECT_EQ(str, sv->value()); \ |
| 371 } | 371 } |
| 372 | 372 |
| 373 } // namespace proxy | 373 } // namespace proxy |
| 374 } // namespace ppapi | 374 } // namespace ppapi |
| OLD | NEW |