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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 586223002: Add new media request result MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 2 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 return widget_host_view; 1792 return widget_host_view;
1793 } 1793 }
1794 1794
1795 void WebContentsImpl::RequestMediaAccessPermission( 1795 void WebContentsImpl::RequestMediaAccessPermission(
1796 const MediaStreamRequest& request, 1796 const MediaStreamRequest& request,
1797 const MediaResponseCallback& callback) { 1797 const MediaResponseCallback& callback) {
1798 if (delegate_) { 1798 if (delegate_) {
1799 delegate_->RequestMediaAccessPermission(this, request, callback); 1799 delegate_->RequestMediaAccessPermission(this, request, callback);
1800 } else { 1800 } else {
1801 callback.Run(MediaStreamDevices(), 1801 callback.Run(MediaStreamDevices(),
1802 MEDIA_DEVICE_INVALID_STATE, 1802 MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN,
1803 scoped_ptr<MediaStreamUI>()); 1803 scoped_ptr<MediaStreamUI>());
1804 } 1804 }
1805 } 1805 }
1806 1806
1807 bool WebContentsImpl::CheckMediaAccessPermission(const GURL& security_origin, 1807 bool WebContentsImpl::CheckMediaAccessPermission(const GURL& security_origin,
1808 MediaStreamType type) { 1808 MediaStreamType type) {
1809 DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE || 1809 DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE ||
1810 type == MEDIA_DEVICE_VIDEO_CAPTURE); 1810 type == MEDIA_DEVICE_VIDEO_CAPTURE);
1811 return delegate_ && 1811 return delegate_ &&
1812 delegate_->CheckMediaAccessPermission(this, security_origin, type); 1812 delegate_->CheckMediaAccessPermission(this, security_origin, type);
(...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after
4372 node->render_manager()->ResumeResponseDeferredAtStart(); 4372 node->render_manager()->ResumeResponseDeferredAtStart();
4373 } 4373 }
4374 4374
4375 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4375 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4376 force_disable_overscroll_content_ = force_disable; 4376 force_disable_overscroll_content_ = force_disable;
4377 if (view_) 4377 if (view_)
4378 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4378 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4379 } 4379 }
4380 4380
4381 } // namespace content 4381 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_ui_proxy.cc ('k') | content/public/common/media_stream_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698