| 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 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 gpu::GpuChannelEstablishFactory* factory = | 1468 gpu::GpuChannelEstablishFactory* factory = |
| 1469 GetContentClient()->browser()->GetGpuChannelEstablishFactory(); | 1469 GetContentClient()->browser()->GetGpuChannelEstablishFactory(); |
| 1470 if (!factory) { | 1470 if (!factory) { |
| 1471 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1471 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| 1472 factory = BrowserGpuChannelHostFactory::instance(); | 1472 factory = BrowserGpuChannelHostFactory::instance(); |
| 1473 } | 1473 } |
| 1474 DCHECK(factory); | 1474 DCHECK(factory); |
| 1475 ImageTransportFactory::Initialize(); | 1475 ImageTransportFactory::Initialize(); |
| 1476 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory); | 1476 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory); |
| 1477 #if defined(USE_AURA) | 1477 #if defined(USE_AURA) |
| 1478 bool use_mus_in_renderer = !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1478 if (env_->mode() == aura::Env::Mode::LOCAL) { |
| 1479 switches::kNoUseMusInRenderer); | |
| 1480 if (!use_mus_in_renderer || env_->mode() == aura::Env::Mode::LOCAL) { | |
| 1481 env_->set_context_factory(GetContextFactory()); | 1479 env_->set_context_factory(GetContextFactory()); |
| 1482 env_->set_context_factory_private(GetContextFactoryPrivate()); | 1480 env_->set_context_factory_private(GetContextFactoryPrivate()); |
| 1483 } | 1481 } |
| 1484 #endif // defined(USE_AURA) | 1482 #endif // defined(USE_AURA) |
| 1485 #endif // defined(OS_ANDROID) | 1483 #endif // defined(OS_ANDROID) |
| 1486 | 1484 |
| 1487 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that | 1485 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that |
| 1488 // unregistration happens on the IO thread (See | 1486 // unregistration happens on the IO thread (See |
| 1489 // BrowserProcessSubThread::IOThreadPreCleanUp). | 1487 // BrowserProcessSubThread::IOThreadPreCleanUp). |
| 1490 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 1488 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 1790 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
| 1793 MediaInternals::GetInstance()); | 1791 MediaInternals::GetInstance()); |
| 1794 } | 1792 } |
| 1795 CHECK(audio_manager_); | 1793 CHECK(audio_manager_); |
| 1796 | 1794 |
| 1797 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1795 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1798 CHECK(audio_system_); | 1796 CHECK(audio_system_); |
| 1799 } | 1797 } |
| 1800 | 1798 |
| 1801 } // namespace content | 1799 } // namespace content |
| OLD | NEW |