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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 base::WaitableEvent* shutdown_event) { | 124 base::WaitableEvent* shutdown_event) { |
125 ipc_message_loop_ = ipc_message_loop; | 125 ipc_message_loop_ = ipc_message_loop; |
126 shutdown_event_ = shutdown_event; | 126 shutdown_event_ = shutdown_event; |
127 } | 127 } |
128 | 128 |
129 void set_browser_sender(IPC::Sender* browser_sender) { | 129 void set_browser_sender(IPC::Sender* browser_sender) { |
130 browser_sender_ = browser_sender; | 130 browser_sender_ = browser_sender; |
131 } | 131 } |
132 | 132 |
133 // ProxyChannel::Delegate implementation. | 133 // ProxyChannel::Delegate implementation. |
134 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; | 134 virtual base::MessageLoopProxy* GetIPCMessageLoop() override; |
135 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; | 135 virtual base::WaitableEvent* GetShutdownEvent() override; |
136 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 136 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
137 base::PlatformFile handle, | 137 base::PlatformFile handle, |
138 base::ProcessId remote_pid, | 138 base::ProcessId remote_pid, |
139 bool should_close_source) OVERRIDE; | 139 bool should_close_source) override; |
140 | 140 |
141 // PluginDispatcher::PluginDelegate implementation. | 141 // PluginDispatcher::PluginDelegate implementation. |
142 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; | 142 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override; |
143 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) OVERRIDE; | 143 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) override; |
144 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; | 144 virtual void Unregister(uint32 plugin_dispatcher_id) override; |
145 | 145 |
146 // PluginProxyDelegate implementation. | 146 // PluginProxyDelegate implementation. |
147 virtual IPC::Sender* GetBrowserSender() OVERRIDE; | 147 virtual IPC::Sender* GetBrowserSender() override; |
148 virtual std::string GetUILanguage() OVERRIDE; | 148 virtual std::string GetUILanguage() override; |
149 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 149 virtual void PreCacheFont(const void* logfontw) override; |
150 virtual void SetActiveURL(const std::string& url) OVERRIDE; | 150 virtual void SetActiveURL(const std::string& url) override; |
151 virtual PP_Resource CreateBrowserFont( | 151 virtual PP_Resource CreateBrowserFont( |
152 Connection connection, | 152 Connection connection, |
153 PP_Instance instance, | 153 PP_Instance instance, |
154 const PP_BrowserFont_Trusted_Description& desc, | 154 const PP_BrowserFont_Trusted_Description& desc, |
155 const Preferences& prefs) OVERRIDE; | 155 const Preferences& prefs) override; |
156 | 156 |
157 private: | 157 private: |
158 base::MessageLoopProxy* ipc_message_loop_; // Weak | 158 base::MessageLoopProxy* ipc_message_loop_; // Weak |
159 base::WaitableEvent* shutdown_event_; // Weak | 159 base::WaitableEvent* shutdown_event_; // Weak |
160 std::set<PP_Instance> instance_id_set_; | 160 std::set<PP_Instance> instance_id_set_; |
161 IPC::Sender* browser_sender_; | 161 IPC::Sender* browser_sender_; |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(PluginDelegateMock); | 163 DISALLOW_COPY_AND_ASSIGN(PluginDelegateMock); |
164 }; | 164 }; |
165 | 165 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // These can be called on any thread. | 216 // These can be called on any thread. |
217 void PostQuitForMainThread(); | 217 void PostQuitForMainThread(); |
218 void PostQuitForSecondaryThread(); | 218 void PostQuitForSecondaryThread(); |
219 | 219 |
220 protected: | 220 protected: |
221 scoped_refptr<MessageLoopResource> secondary_thread_message_loop_; | 221 scoped_refptr<MessageLoopResource> secondary_thread_message_loop_; |
222 scoped_refptr<base::MessageLoopProxy> main_thread_message_loop_proxy_; | 222 scoped_refptr<base::MessageLoopProxy> main_thread_message_loop_proxy_; |
223 | 223 |
224 private: | 224 private: |
225 // base::DelegateSimpleThread::Delegate implementation. | 225 // base::DelegateSimpleThread::Delegate implementation. |
226 virtual void Run() OVERRIDE; | 226 virtual void Run() override; |
227 | 227 |
228 void QuitNestedLoop(); | 228 void QuitNestedLoop(); |
229 | 229 |
230 static void InternalSetUpTestOnSecondaryThread(void* user_data, | 230 static void InternalSetUpTestOnSecondaryThread(void* user_data, |
231 int32_t result); | 231 int32_t result); |
232 | 232 |
233 scoped_ptr<base::DelegateSimpleThread> secondary_thread_; | 233 scoped_ptr<base::DelegateSimpleThread> secondary_thread_; |
234 scoped_ptr<base::RunLoop> nested_main_thread_message_loop_; | 234 scoped_ptr<base::RunLoop> nested_main_thread_message_loop_; |
235 }; | 235 }; |
236 | 236 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 ipc_message_loop_ = ipc_message_loop; | 268 ipc_message_loop_ = ipc_message_loop; |
269 shutdown_event_ = shutdown_event; | 269 shutdown_event_ = shutdown_event; |
270 } | 270 } |
271 | 271 |
272 // ProxyChannel::Delegate implementation. | 272 // ProxyChannel::Delegate implementation. |
273 virtual base::MessageLoopProxy* GetIPCMessageLoop(); | 273 virtual base::MessageLoopProxy* GetIPCMessageLoop(); |
274 virtual base::WaitableEvent* GetShutdownEvent(); | 274 virtual base::WaitableEvent* GetShutdownEvent(); |
275 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 275 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
276 base::PlatformFile handle, | 276 base::PlatformFile handle, |
277 base::ProcessId remote_pid, | 277 base::ProcessId remote_pid, |
278 bool should_close_source) OVERRIDE; | 278 bool should_close_source) override; |
279 | 279 |
280 private: | 280 private: |
281 base::MessageLoopProxy* ipc_message_loop_; // Weak | 281 base::MessageLoopProxy* ipc_message_loop_; // Weak |
282 base::WaitableEvent* shutdown_event_; // Weak | 282 base::WaitableEvent* shutdown_event_; // Weak |
283 | 283 |
284 DISALLOW_COPY_AND_ASSIGN(DelegateMock); | 284 DISALLOW_COPY_AND_ASSIGN(DelegateMock); |
285 }; | 285 }; |
286 | 286 |
287 private: | 287 private: |
288 void CreateHostGlobals(); | 288 void CreateHostGlobals(); |
(...skipping 70 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 |