OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/nacl/browser/nacl_host_message_filter.h" | 5 #include "components/nacl/browser/nacl_host_message_filter.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 } | 318 } |
319 | 319 |
320 void NaClHostMessageFilter::AsyncReturnTemporaryFile( | 320 void NaClHostMessageFilter::AsyncReturnTemporaryFile( |
321 int pp_instance, | 321 int pp_instance, |
322 const base::File& file, | 322 const base::File& file, |
323 bool is_hit) { | 323 bool is_hit) { |
324 IPC::PlatformFileForTransit fd = IPC::InvalidPlatformFileForTransit(); | 324 IPC::PlatformFileForTransit fd = IPC::InvalidPlatformFileForTransit(); |
325 if (file.IsValid()) { | 325 if (file.IsValid()) { |
326 // Don't close our copy of the handle, because PnaclHost will use it | 326 // Don't close our copy of the handle, because PnaclHost will use it |
327 // when the translation finishes. | 327 // when the translation finishes. |
328 fd = IPC::GetFileHandleForProcess(file.GetPlatformFile(), PeerHandle(), | 328 fd = IPC::GetPlatformFileForTransit(file.GetPlatformFile(), false); |
329 false); | |
330 } | 329 } |
331 Send(new NaClViewMsg_NexeTempFileReply(pp_instance, is_hit, fd)); | 330 Send(new NaClViewMsg_NexeTempFileReply(pp_instance, is_hit, fd)); |
332 } | 331 } |
333 | 332 |
334 void NaClHostMessageFilter::OnNaClGetNumProcessors(int* num_processors) { | 333 void NaClHostMessageFilter::OnNaClGetNumProcessors(int* num_processors) { |
335 *num_processors = base::SysInfo::NumberOfProcessors(); | 334 *num_processors = base::SysInfo::NumberOfProcessors(); |
336 } | 335 } |
337 | 336 |
338 void NaClHostMessageFilter::OnGetNexeFd( | 337 void NaClHostMessageFilter::OnGetNexeFd( |
339 int render_view_id, | 338 int render_view_id, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 reply_msg); | 379 reply_msg); |
381 } | 380 } |
382 | 381 |
383 void NaClHostMessageFilter::OnNaClDebugEnabledForURL(const GURL& nmf_url, | 382 void NaClHostMessageFilter::OnNaClDebugEnabledForURL(const GURL& nmf_url, |
384 bool* should_debug) { | 383 bool* should_debug) { |
385 *should_debug = | 384 *should_debug = |
386 nacl::NaClBrowser::GetDelegate()->URLMatchesDebugPatterns(nmf_url); | 385 nacl::NaClBrowser::GetDelegate()->URLMatchesDebugPatterns(nmf_url); |
387 } | 386 } |
388 | 387 |
389 } // namespace nacl | 388 } // namespace nacl |
OLD | NEW |