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 "content/renderer/pepper/pepper_broker_impl.h" | 5 #include "content/renderer/pepper/pepper_broker_impl.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "content/public/renderer/renderer_restrict_dispatch_group.h" | 8 #include "content/public/renderer/renderer_restrict_dispatch_group.h" |
9 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 9 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
10 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" | 10 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 if (!result) { | 220 if (!result) { |
221 // Report failure. | 221 // Report failure. |
222 client->BrokerConnected( | 222 client->BrokerConnected( |
223 ppapi::PlatformFileToInt(base::kInvalidPlatformFileValue), | 223 ppapi::PlatformFileToInt(base::kInvalidPlatformFileValue), |
224 PP_ERROR_NOACCESS); | 224 PP_ERROR_NOACCESS); |
225 pending_connects_.erase(entry); | 225 pending_connects_.erase(entry); |
226 return; | 226 return; |
227 } | 227 } |
228 | 228 |
229 if (dispatcher_.get()) { | 229 if (dispatcher_) { |
230 ConnectPluginToBroker(client); | 230 ConnectPluginToBroker(client); |
231 pending_connects_.erase(entry); | 231 pending_connects_.erase(entry); |
232 return; | 232 return; |
233 } | 233 } |
234 | 234 |
235 // Mark the request as authorized, continue waiting for the broker | 235 // Mark the request as authorized, continue waiting for the broker |
236 // connection. | 236 // connection. |
237 DCHECK(!entry->second.is_authorized); | 237 DCHECK(!entry->second.is_authorized); |
238 entry->second.is_authorized = true; | 238 entry->second.is_authorized = true; |
239 } | 239 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 // TOOD(ddorwin): Change the IPC to asynchronous: Queue an object containing | 284 // TOOD(ddorwin): Change the IPC to asynchronous: Queue an object containing |
285 // client and plugin_socket.release(), then return. | 285 // client and plugin_socket.release(), then return. |
286 // That message handler will then call client->BrokerConnected() with the | 286 // That message handler will then call client->BrokerConnected() with the |
287 // saved pipe handle. | 287 // saved pipe handle. |
288 // Temporarily, just call back. | 288 // Temporarily, just call back. |
289 client->BrokerConnected(ppapi::PlatformFileToInt(plugin_handle), result); | 289 client->BrokerConnected(ppapi::PlatformFileToInt(plugin_handle), result); |
290 } | 290 } |
291 | 291 |
292 } // namespace content | 292 } // namespace content |
OLD | NEW |