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

Unified Diff: services/video_capture/service_impl.h

Issue 2897033006: [Mojo Video Capture] Initialize COM on Windows (Closed)
Patch Set: Move the |com_initializer_| to top of members Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/service_impl.h
diff --git a/services/video_capture/service_impl.h b/services/video_capture/service_impl.h
index 2881bc61688c86f600ab6dac73803d9c1dc0583c..fc40952105cf5a6ec977d607c5aa0e858dfc34b2 100644
--- a/services/video_capture/service_impl.h
+++ b/services/video_capture/service_impl.h
@@ -13,6 +13,10 @@
#include "services/service_manager/public/cpp/service_context_ref.h"
#include "services/video_capture/public/interfaces/device_factory_provider.mojom.h"
+#if defined(OS_WIN)
+#include "base/win/scoped_com_initializer.h"
+#endif
+
namespace video_capture {
class ServiceImpl : public service_manager::Service {
@@ -35,6 +39,10 @@ class ServiceImpl : public service_manager::Service {
void MaybeRequestQuitDelayed();
void MaybeRequestQuit();
+#if defined(OS_WIN)
+ // COM must be initialized in order to access the video capture devices.
+ base::win::ScopedCOMInitializer com_initializer_;
+#endif
float shutdown_delay_in_seconds_;
service_manager::BinderRegistry registry_;
std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698