Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2380)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 1637083002: Add CdmService to keep track of CDMs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove const Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 9 #include <utility>
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 #if !defined(OS_ANDROID) 161 #if !defined(OS_ANDROID)
162 #include "content/public/browser/zygote_handle_linux.h" 162 #include "content/public/browser/zygote_handle_linux.h"
163 #endif // !defined(OS_ANDROID) 163 #endif // !defined(OS_ANDROID)
164 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) 164 #endif // defined(OS_POSIX) && !defined(OS_MACOSX)
165 165
166 166
167 #if defined(ENABLE_PLUGINS) 167 #if defined(ENABLE_PLUGINS)
168 #include "content/browser/plugin_service_impl.h" 168 #include "content/browser/plugin_service_impl.h"
169 #endif 169 #endif
170 170
171 #if defined(ENABLE_MOJO_CDM) && defined(ENABLE_PEPPER_CDMS)
172 #include "content/browser/media/cdm_service_impl.h"
173 #endif
174
171 #if defined(USE_X11) 175 #if defined(USE_X11)
172 #include "ui/base/x/x11_util_internal.h" 176 #include "ui/base/x/x11_util_internal.h"
173 #include "ui/gfx/x/x11_connection.h" 177 #include "ui/gfx/x/x11_connection.h"
174 #include "ui/gfx/x/x11_switches.h" 178 #include "ui/gfx/x/x11_switches.h"
175 #include "ui/gfx/x/x11_types.h" 179 #include "ui/gfx/x/x11_types.h"
176 #endif 180 #endif
177 181
178 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) 182 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL)
179 #include "crypto/nss_util.h" 183 #include "crypto/nss_util.h"
180 #endif 184 #endif
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 // Prior to any processing happening on the IO thread, we create the 729 // Prior to any processing happening on the IO thread, we create the
726 // plugin service as it is predominantly used from the IO thread, 730 // plugin service as it is predominantly used from the IO thread,
727 // but must be created on the main thread. The service ctor is 731 // but must be created on the main thread. The service ctor is
728 // inexpensive and does not invoke the io_thread() accessor. 732 // inexpensive and does not invoke the io_thread() accessor.
729 { 733 {
730 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); 734 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService");
731 PluginService::GetInstance()->Init(); 735 PluginService::GetInstance()->Init();
732 } 736 }
733 #endif 737 #endif
734 738
739 #if defined(ENABLE_MOJO_CDM) && defined(ENABLE_PEPPER_CDMS)
740 // Prior to any processing happening on the IO thread, we create the
741 // CDM service as it is predominantly used from the IO thread. This must
742 // be called on the main thread since it involves file path checks.
743 CdmService::GetInstance()->Init();
744 #endif
745
735 #if defined(OS_MACOSX) 746 #if defined(OS_MACOSX)
736 // The WindowResizeHelper allows the UI thread to wait on specific renderer 747 // The WindowResizeHelper allows the UI thread to wait on specific renderer
737 // and GPU messages from the IO thread. Initializing it before the IO thread 748 // and GPU messages from the IO thread. Initializing it before the IO thread
738 // starts ensures the affected IO thread messages always have somewhere to go. 749 // starts ensures the affected IO thread messages always have somewhere to go.
739 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get()); 750 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get());
740 #endif 751 #endif
741 752
742 // 1) Need to initialize in-process GpuDataManager before creating threads. 753 // 1) Need to initialize in-process GpuDataManager before creating threads.
743 // It's unsafe to append the gpu command line switches to the global 754 // It's unsafe to append the gpu command line switches to the global
744 // CommandLine::ForCurrentProcess object after threads are created. 755 // CommandLine::ForCurrentProcess object after threads are created.
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 DCHECK(is_tracing_startup_for_duration_); 1460 DCHECK(is_tracing_startup_for_duration_);
1450 1461
1451 is_tracing_startup_for_duration_ = false; 1462 is_tracing_startup_for_duration_ = false;
1452 TracingController::GetInstance()->StopTracing( 1463 TracingController::GetInstance()->StopTracing(
1453 TracingController::CreateFileSink( 1464 TracingController::CreateFileSink(
1454 startup_trace_file_, 1465 startup_trace_file_,
1455 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1466 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1456 } 1467 }
1457 1468
1458 } // namespace content 1469 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698