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

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: changes 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 #if !defined(OS_ANDROID) 164 #if !defined(OS_ANDROID)
165 #include "content/public/browser/zygote_handle_linux.h" 165 #include "content/public/browser/zygote_handle_linux.h"
166 #endif // !defined(OS_ANDROID) 166 #endif // !defined(OS_ANDROID)
167 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) 167 #endif // defined(OS_POSIX) && !defined(OS_MACOSX)
168 168
169 169
170 #if defined(ENABLE_PLUGINS) 170 #if defined(ENABLE_PLUGINS)
171 #include "content/browser/plugin_service_impl.h" 171 #include "content/browser/plugin_service_impl.h"
172 #endif 172 #endif
173 173
174 #if defined(ENABLE_MOJO_MEDIA)
xhwang 2016/04/13 00:22:12 #if defined(ENABLE_MOJO_CDM) && defined(ENABLE_PEP
jrummell 2016/04/14 01:32:16 Done.
175 #include "content/browser/media/cdm_service_impl.h"
176 #endif
177
174 #if defined(USE_X11) 178 #if defined(USE_X11)
175 #include "ui/base/x/x11_util_internal.h" 179 #include "ui/base/x/x11_util_internal.h"
176 #include "ui/gfx/x/x11_connection.h" 180 #include "ui/gfx/x/x11_connection.h"
177 #include "ui/gfx/x/x11_switches.h" 181 #include "ui/gfx/x/x11_switches.h"
178 #include "ui/gfx/x/x11_types.h" 182 #include "ui/gfx/x/x11_types.h"
179 #endif 183 #endif
180 184
181 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) 185 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL)
182 #include "crypto/nss_util.h" 186 #include "crypto/nss_util.h"
183 #endif 187 #endif
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 // Prior to any processing happening on the IO thread, we create the 740 // Prior to any processing happening on the IO thread, we create the
737 // plugin service as it is predominantly used from the IO thread, 741 // plugin service as it is predominantly used from the IO thread,
738 // but must be created on the main thread. The service ctor is 742 // but must be created on the main thread. The service ctor is
739 // inexpensive and does not invoke the io_thread() accessor. 743 // inexpensive and does not invoke the io_thread() accessor.
740 { 744 {
741 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); 745 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService");
742 PluginService::GetInstance()->Init(); 746 PluginService::GetInstance()->Init();
743 } 747 }
744 #endif 748 #endif
745 749
750 #if defined(ENABLE_MOJO_MEDIA)
xhwang 2016/04/13 00:22:12 ditto
jrummell 2016/04/14 01:32:16 Done.
751 // Prior to any processing happening on the IO thread, we create the
752 // CDM service as it is predominantly used from the IO thread.
xhwang 2016/04/13 00:22:12 Also mention that this must be called on the main
jrummell 2016/04/14 01:32:16 Done.
753 CdmService::GetInstance()->Init();
754 #endif
755
746 #if defined(OS_MACOSX) && !defined(OS_IOS) 756 #if defined(OS_MACOSX) && !defined(OS_IOS)
747 // The WindowResizeHelper allows the UI thread to wait on specific renderer 757 // The WindowResizeHelper allows the UI thread to wait on specific renderer
748 // and GPU messages from the IO thread. Initializing it before the IO thread 758 // and GPU messages from the IO thread. Initializing it before the IO thread
749 // starts ensures the affected IO thread messages always have somewhere to go. 759 // starts ensures the affected IO thread messages always have somewhere to go.
750 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get()); 760 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get());
751 #endif 761 #endif
752 762
753 // 1) Need to initialize in-process GpuDataManager before creating threads. 763 // 1) Need to initialize in-process GpuDataManager before creating threads.
754 // It's unsafe to append the gpu command line switches to the global 764 // It's unsafe to append the gpu command line switches to the global
755 // CommandLine::ForCurrentProcess object after threads are created. 765 // CommandLine::ForCurrentProcess object after threads are created.
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 DCHECK(is_tracing_startup_for_duration_); 1487 DCHECK(is_tracing_startup_for_duration_);
1478 1488
1479 is_tracing_startup_for_duration_ = false; 1489 is_tracing_startup_for_duration_ = false;
1480 TracingController::GetInstance()->StopTracing( 1490 TracingController::GetInstance()->StopTracing(
1481 TracingController::CreateFileSink( 1491 TracingController::CreateFileSink(
1482 startup_trace_file_, 1492 startup_trace_file_,
1483 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1493 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1484 } 1494 }
1485 1495
1486 } // namespace content 1496 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698