| 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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 "BrowserMainLoop::BrowserThreadsStarted::SaveFileManager"); | 1367 "BrowserMainLoop::BrowserThreadsStarted::SaveFileManager"); |
| 1368 save_file_manager_ = new SaveFileManager(); | 1368 save_file_manager_ = new SaveFileManager(); |
| 1369 } | 1369 } |
| 1370 | 1370 |
| 1371 // Alert the clipboard class to which threads are allowed to access the | 1371 // Alert the clipboard class to which threads are allowed to access the |
| 1372 // clipboard: | 1372 // clipboard: |
| 1373 std::vector<base::PlatformThreadId> allowed_clipboard_threads; | 1373 std::vector<base::PlatformThreadId> allowed_clipboard_threads; |
| 1374 // The current thread is the UI thread. | 1374 // The current thread is the UI thread. |
| 1375 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId()); | 1375 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId()); |
| 1376 #if defined(OS_WIN) | 1376 #if defined(OS_WIN) |
| 1377 // On Windows, clipboards are also used on the FILE or IO threads. | 1377 // On Windows, clipboard is also used on the IO thread. |
| 1378 allowed_clipboard_threads.push_back(file_thread_->GetThreadId()); | |
| 1379 allowed_clipboard_threads.push_back(io_thread_->GetThreadId()); | 1378 allowed_clipboard_threads.push_back(io_thread_->GetThreadId()); |
| 1380 #endif | 1379 #endif |
| 1381 ui::Clipboard::SetAllowedThreads(allowed_clipboard_threads); | 1380 ui::Clipboard::SetAllowedThreads(allowed_clipboard_threads); |
| 1382 | 1381 |
| 1383 // When running the GPU thread in-process, avoid optimistically starting it | 1382 // When running the GPU thread in-process, avoid optimistically starting it |
| 1384 // since creating the GPU thread races against creation of the one-and-only | 1383 // since creating the GPU thread races against creation of the one-and-only |
| 1385 // ChildProcess instance which is created by the renderer thread. | 1384 // ChildProcess instance which is created by the renderer thread. |
| 1386 if (GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL) && | 1385 if (GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL) && |
| 1387 !established_gpu_channel && always_uses_gpu && !UsingInProcessGpu() && | 1386 !established_gpu_channel && always_uses_gpu && !UsingInProcessGpu() && |
| 1388 !service_manager::ServiceManagerIsRemote()) { | 1387 !service_manager::ServiceManagerIsRemote()) { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1620 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1619 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1621 audio_thread_->task_runner(); | 1620 audio_thread_->task_runner(); |
| 1622 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1621 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1623 std::move(worker_task_runner), | 1622 std::move(worker_task_runner), |
| 1624 MediaInternals::GetInstance()); | 1623 MediaInternals::GetInstance()); |
| 1625 } | 1624 } |
| 1626 CHECK(audio_manager_); | 1625 CHECK(audio_manager_); |
| 1627 } | 1626 } |
| 1628 | 1627 |
| 1629 } // namespace content | 1628 } // namespace content |
| OLD | NEW |