OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |