| 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 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 const MediaResponseCallback& callback) { | 1769 const MediaResponseCallback& callback) { |
| 1770 if (delegate_) { | 1770 if (delegate_) { |
| 1771 delegate_->RequestMediaAccessPermission(this, request, callback); | 1771 delegate_->RequestMediaAccessPermission(this, request, callback); |
| 1772 } else { | 1772 } else { |
| 1773 callback.Run(MediaStreamDevices(), | 1773 callback.Run(MediaStreamDevices(), |
| 1774 MEDIA_DEVICE_INVALID_STATE, | 1774 MEDIA_DEVICE_INVALID_STATE, |
| 1775 scoped_ptr<MediaStreamUI>()); | 1775 scoped_ptr<MediaStreamUI>()); |
| 1776 } | 1776 } |
| 1777 } | 1777 } |
| 1778 | 1778 |
| 1779 bool WebContentsImpl::CheckMediaAccessPermission(const GURL& security_origin, |
| 1780 MediaStreamType type) { |
| 1781 DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE || |
| 1782 type == MEDIA_DEVICE_VIDEO_CAPTURE); |
| 1783 return delegate_ && |
| 1784 delegate_->CheckMediaAccessPermission(this, security_origin, type); |
| 1785 } |
| 1786 |
| 1779 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( | 1787 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( |
| 1780 SiteInstance* instance) { | 1788 SiteInstance* instance) { |
| 1781 return controller_.GetSessionStorageNamespace(instance); | 1789 return controller_.GetSessionStorageNamespace(instance); |
| 1782 } | 1790 } |
| 1783 | 1791 |
| 1784 SessionStorageNamespaceMap WebContentsImpl::GetSessionStorageNamespaceMap() { | 1792 SessionStorageNamespaceMap WebContentsImpl::GetSessionStorageNamespaceMap() { |
| 1785 return controller_.GetSessionStorageNamespaceMap(); | 1793 return controller_.GetSessionStorageNamespaceMap(); |
| 1786 } | 1794 } |
| 1787 | 1795 |
| 1788 FrameTree* WebContentsImpl::GetFrameTree() { | 1796 FrameTree* WebContentsImpl::GetFrameTree() { |
| (...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4352 node->render_manager()->ResumeResponseDeferredAtStart(); | 4360 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4353 } | 4361 } |
| 4354 | 4362 |
| 4355 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4363 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4356 force_disable_overscroll_content_ = force_disable; | 4364 force_disable_overscroll_content_ = force_disable; |
| 4357 if (view_) | 4365 if (view_) |
| 4358 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4366 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4359 } | 4367 } |
| 4360 | 4368 |
| 4361 } // namespace content | 4369 } // namespace content |
| OLD | NEW |