| 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/browser/plugin_loader_posix.h" | 5 #include "content/browser/plugin_loader_posix.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" | 
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" | 
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 97   // Check if the list is empty or all plugins have already been loaded before | 97   // Check if the list is empty or all plugins have already been loaded before | 
| 98   // forking. | 98   // forking. | 
| 99   if (MaybeRunPendingCallbacks()) | 99   if (MaybeRunPendingCallbacks()) | 
| 100     return; | 100     return; | 
| 101 | 101 | 
| 102   if (load_start_time_.is_null()) | 102   if (load_start_time_.is_null()) | 
| 103     load_start_time_ = base::TimeTicks::Now(); | 103     load_start_time_ = base::TimeTicks::Now(); | 
| 104 | 104 | 
| 105   UtilityProcessHostImpl* host = new UtilityProcessHostImpl( | 105   UtilityProcessHostImpl* host = new UtilityProcessHostImpl( | 
| 106       this, | 106       this, | 
| 107       BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 107       BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()); | 
| 108   process_host_ = host->AsWeakPtr(); | 108   process_host_ = host->AsWeakPtr(); | 
| 109   process_host_->DisableSandbox(); | 109   process_host_->DisableSandbox(); | 
| 110 #if defined(OS_MACOSX) | 110 #if defined(OS_MACOSX) | 
| 111   host->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION); | 111   host->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION); | 
| 112 #endif | 112 #endif | 
| 113 | 113 | 
| 114   process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_)); | 114   process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_)); | 
| 115 } | 115 } | 
| 116 | 116 | 
| 117 void PluginLoaderPosix::OnPluginLoaded(uint32 index, | 117 void PluginLoaderPosix::OnPluginLoaded(uint32 index, | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 193     scoped_refptr<base::MessageLoopProxy> loop, | 193     scoped_refptr<base::MessageLoopProxy> loop, | 
| 194     const PluginService::GetPluginsCallback& cb) | 194     const PluginService::GetPluginsCallback& cb) | 
| 195     : target_loop(loop), | 195     : target_loop(loop), | 
| 196       callback(cb) { | 196       callback(cb) { | 
| 197 } | 197 } | 
| 198 | 198 | 
| 199 PluginLoaderPosix::PendingCallback::~PendingCallback() { | 199 PluginLoaderPosix::PendingCallback::~PendingCallback() { | 
| 200 } | 200 } | 
| 201 | 201 | 
| 202 }  // namespace content | 202 }  // namespace content | 
| OLD | NEW | 
|---|