| 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 "content/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 base::WaitableEvent* PpapiThread::GetShutdownEvent() { | 65 base::WaitableEvent* PpapiThread::GetShutdownEvent() { |
| 66 return ChildProcess::current()->GetShutDownEvent(); | 66 return ChildProcess::current()->GetShutDownEvent(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { | 69 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { |
| 70 return &globally_seen_instance_ids_; | 70 return &globally_seen_instance_ids_; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { | 73 void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { |
| 74 base::ScopedNativeLibrary library(base::LoadNativeLibrary(path)); | 74 base::ScopedNativeLibrary library(base::LoadNativeLibrary(path, NULL)); |
| 75 if (!library.is_valid()) | 75 if (!library.is_valid()) |
| 76 return; | 76 return; |
| 77 | 77 |
| 78 if (is_broker_) { | 78 if (is_broker_) { |
| 79 // Get the InitializeBroker function (required). | 79 // Get the InitializeBroker function (required). |
| 80 InitializeBrokerFunc init_broker = | 80 InitializeBrokerFunc init_broker = |
| 81 reinterpret_cast<InitializeBrokerFunc>( | 81 reinterpret_cast<InitializeBrokerFunc>( |
| 82 library.GetFunctionPointer("PPP_InitializeBroker")); | 82 library.GetFunctionPointer("PPP_InitializeBroker")); |
| 83 if (!init_broker) { | 83 if (!init_broker) { |
| 84 LOG(WARNING) << "No PPP_InitializeBroker in plugin library"; | 84 LOG(WARNING) << "No PPP_InitializeBroker in plugin library"; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 #if defined(OS_POSIX) | 173 #if defined(OS_POSIX) |
| 174 // On POSIX, pass the renderer-side FD. | 174 // On POSIX, pass the renderer-side FD. |
| 175 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), | 175 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), |
| 176 true); | 176 true); |
| 177 #endif | 177 #endif |
| 178 | 178 |
| 179 // From here, the dispatcher will manage its own lifetime according to the | 179 // From here, the dispatcher will manage its own lifetime according to the |
| 180 // lifetime of the attached channel. | 180 // lifetime of the attached channel. |
| 181 return true; | 181 return true; |
| 182 } | 182 } |
| OLD | NEW |