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/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1482 // Disallow mojo sync calls in the browser process. Note that we allow sync | 1482 // Disallow mojo sync calls in the browser process. Note that we allow sync |
1483 // calls in single-process mode since renderer IPCs are made from a browser | 1483 // calls in single-process mode since renderer IPCs are made from a browser |
1484 // thread. | 1484 // thread. |
1485 bool sync_call_allowed = false; | 1485 bool sync_call_allowed = false; |
1486 MojoResult result = mojo::edk::SetProperty( | 1486 MojoResult result = mojo::edk::SetProperty( |
1487 MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed); | 1487 MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed); |
1488 DCHECK_EQ(MOJO_RESULT_OK, result); | 1488 DCHECK_EQ(MOJO_RESULT_OK, result); |
1489 } | 1489 } |
1490 | 1490 |
1491 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( | 1491 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( |
1492 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) | 1492 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); |
1493 ->task_runner())); | |
1494 | 1493 |
1495 service_manager_context_.reset(new ServiceManagerContext); | 1494 service_manager_context_.reset(new ServiceManagerContext); |
1496 #if defined(OS_MACOSX) | 1495 #if defined(OS_MACOSX) |
1497 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); | 1496 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); |
1498 #endif // defined(OS_MACOSX) | 1497 #endif // defined(OS_MACOSX) |
1499 if (parts_) { | 1498 if (parts_) { |
1500 parts_->ServiceManagerConnectionStarted( | 1499 parts_->ServiceManagerConnectionStarted( |
1501 ServiceManagerConnection::GetForProcess()); | 1500 ServiceManagerConnection::GetForProcess()); |
1502 } | 1501 } |
1503 } | 1502 } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1591 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
1593 audio_thread_->task_runner(); | 1592 audio_thread_->task_runner(); |
1594 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1593 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
1595 std::move(worker_task_runner), | 1594 std::move(worker_task_runner), |
1596 MediaInternals::GetInstance()); | 1595 MediaInternals::GetInstance()); |
1597 } | 1596 } |
1598 CHECK(audio_manager_); | 1597 CHECK(audio_manager_); |
1599 } | 1598 } |
1600 | 1599 |
1601 } // namespace content | 1600 } // namespace content |
OLD | NEW |