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

Side by Side Diff: content/browser/media/capture/image_capture_impl.cc

Issue 2077983003: Intiialize AudioManager and related class lazily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/media/capture/image_capture_impl.h" 5 #include "content/browser/media/capture/image_capture_impl.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "content/browser/browser_main_loop.h" 8 #include "content/browser/browser_main_loop.h"
9 #include "content/browser/renderer_host/media/media_stream_manager.h" 9 #include "content/browser/renderer_host/media/media_stream_manager.h"
10 #include "content/browser/renderer_host/media/video_capture_manager.h" 10 #include "content/browser/renderer_host/media/video_capture_manager.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DCHECK_CURRENTLY_ON(BrowserThread::UI); 98 DCHECK_CURRENTLY_ON(BrowserThread::UI);
99 99
100 media::ScopedResultCallback<TakePhotoCallback> scoped_callback( 100 media::ScopedResultCallback<TakePhotoCallback> scoped_callback(
101 base::Bind(&RunTakePhotoCallbackOnUIThread, callback), 101 base::Bind(&RunTakePhotoCallbackOnUIThread, callback),
102 media::BindToCurrentLoop(base::Bind(&RunFailedTakePhotoCallback))); 102 media::BindToCurrentLoop(base::Bind(&RunFailedTakePhotoCallback)));
103 103
104 // media_stream_manager() can only be called on UI thread. 104 // media_stream_manager() can only be called on UI thread.
105 BrowserThread::PostTask( 105 BrowserThread::PostTask(
106 BrowserThread::IO, FROM_HERE, 106 BrowserThread::IO, FROM_HERE,
107 base::Bind(&TakePhotoOnIOThread, source_id, 107 base::Bind(&TakePhotoOnIOThread, source_id,
108 BrowserMainLoop::GetInstance()->media_stream_manager(), 108 BrowserMainLoop::GetInstance()->GetMediaStreamManager(),
109 base::Passed(&scoped_callback))); 109 base::Passed(&scoped_callback)));
110 } 110 }
111 111
112 ImageCaptureImpl::ImageCaptureImpl( 112 ImageCaptureImpl::ImageCaptureImpl(
113 mojo::InterfaceRequest<media::mojom::ImageCapture> request) 113 mojo::InterfaceRequest<media::mojom::ImageCapture> request)
114 : binding_(this, std::move(request)) {} 114 : binding_(this, std::move(request)) {}
115 115
116 } // namespace content 116 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698