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

Side by Side Diff: ppapi/proxy/ppapi_proxy_test.h

Issue 11722017: Use an explicit PID for duplicating Pepper handles rather than the Channel's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 void set_browser_sender(IPC::Sender* browser_sender) { 114 void set_browser_sender(IPC::Sender* browser_sender) {
115 browser_sender_ = browser_sender; 115 browser_sender_ = browser_sender;
116 } 116 }
117 117
118 // ProxyChannel::Delegate implementation. 118 // ProxyChannel::Delegate implementation.
119 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; 119 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE;
120 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; 120 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE;
121 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( 121 virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
122 base::PlatformFile handle, 122 base::PlatformFile handle,
123 const IPC::SyncChannel& /* channel */, 123 base::ProcessId remote_pid,
124 bool should_close_source) OVERRIDE; 124 bool should_close_source) OVERRIDE;
125 125
126 // PluginDispatcher::PluginDelegate implementation. 126 // PluginDispatcher::PluginDelegate implementation.
127 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; 127 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE;
128 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) OVERRIDE; 128 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) OVERRIDE;
129 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; 129 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE;
130 130
131 // PluginProxyDelegate implementation. 131 // PluginProxyDelegate implementation.
132 virtual IPC::Sender* GetBrowserSender() OVERRIDE; 132 virtual IPC::Sender* GetBrowserSender() OVERRIDE;
133 virtual std::string GetUILanguage() OVERRIDE; 133 virtual std::string GetUILanguage() OVERRIDE;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 base::WaitableEvent* shutdown_event) { 195 base::WaitableEvent* shutdown_event) {
196 ipc_message_loop_ = ipc_message_loop; 196 ipc_message_loop_ = ipc_message_loop;
197 shutdown_event_ = shutdown_event; 197 shutdown_event_ = shutdown_event;
198 } 198 }
199 199
200 // ProxyChannel::Delegate implementation. 200 // ProxyChannel::Delegate implementation.
201 virtual base::MessageLoopProxy* GetIPCMessageLoop(); 201 virtual base::MessageLoopProxy* GetIPCMessageLoop();
202 virtual base::WaitableEvent* GetShutdownEvent(); 202 virtual base::WaitableEvent* GetShutdownEvent();
203 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( 203 virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
204 base::PlatformFile handle, 204 base::PlatformFile handle,
205 const IPC::SyncChannel& /* channel */, 205 base::ProcessId remote_pid,
206 bool should_close_source) OVERRIDE; 206 bool should_close_source) OVERRIDE;
207 207
208 private: 208 private:
209 base::MessageLoopProxy* ipc_message_loop_; // Weak 209 base::MessageLoopProxy* ipc_message_loop_; // Weak
210 base::WaitableEvent* shutdown_event_; // Weak 210 base::WaitableEvent* shutdown_event_; // Weak
211 211
212 DISALLOW_COPY_AND_ASSIGN(DelegateMock); 212 DISALLOW_COPY_AND_ASSIGN(DelegateMock);
213 }; 213 };
214 214
215 private: 215 private:
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // EXPECT_VAR_IS_STRING("foo", my_var); 288 // EXPECT_VAR_IS_STRING("foo", my_var);
289 #define EXPECT_VAR_IS_STRING(str, var) { \ 289 #define EXPECT_VAR_IS_STRING(str, var) { \
290 StringVar* sv = StringVar::FromPPVar(var); \ 290 StringVar* sv = StringVar::FromPPVar(var); \
291 EXPECT_TRUE(sv); \ 291 EXPECT_TRUE(sv); \
292 if (sv) \ 292 if (sv) \
293 EXPECT_EQ(str, sv->value()); \ 293 EXPECT_EQ(str, sv->value()); \
294 } 294 }
295 295
296 } // namespace proxy 296 } // namespace proxy
297 } // namespace ppapi 297 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698