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 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1744 const MediaResponseCallback& callback) { | 1744 const MediaResponseCallback& callback) { |
1745 if (delegate_) { | 1745 if (delegate_) { |
1746 delegate_->RequestMediaAccessPermission(this, request, callback); | 1746 delegate_->RequestMediaAccessPermission(this, request, callback); |
1747 } else { | 1747 } else { |
1748 callback.Run(MediaStreamDevices(), | 1748 callback.Run(MediaStreamDevices(), |
1749 MEDIA_DEVICE_INVALID_STATE, | 1749 MEDIA_DEVICE_INVALID_STATE, |
1750 scoped_ptr<MediaStreamUI>()); | 1750 scoped_ptr<MediaStreamUI>()); |
1751 } | 1751 } |
1752 } | 1752 } |
1753 | 1753 |
1754 bool WebContentsImpl::CheckMediaAccessPermission(const GURL& security_origin, | |
1755 MediaStreamType type) { | |
1756 DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE || | |
1757 type == MEDIA_DEVICE_VIDEO_CAPTURE); | |
1758 if (delegate_) | |
1759 return delegate_->CheckMediaAccessPermission(this, security_origin, type); | |
1760 else | |
sky
2014/09/12 16:19:14
nit: no else here, or you can make a single return
Henrik Grunell
2014/09/15 11:33:47
Done.
| |
1761 return false; | |
1762 } | |
1763 | |
1754 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( | 1764 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( |
1755 SiteInstance* instance) { | 1765 SiteInstance* instance) { |
1756 return controller_.GetSessionStorageNamespace(instance); | 1766 return controller_.GetSessionStorageNamespace(instance); |
1757 } | 1767 } |
1758 | 1768 |
1759 SessionStorageNamespaceMap WebContentsImpl::GetSessionStorageNamespaceMap() { | 1769 SessionStorageNamespaceMap WebContentsImpl::GetSessionStorageNamespaceMap() { |
1760 return controller_.GetSessionStorageNamespaceMap(); | 1770 return controller_.GetSessionStorageNamespaceMap(); |
1761 } | 1771 } |
1762 | 1772 |
1763 FrameTree* WebContentsImpl::GetFrameTree() { | 1773 FrameTree* WebContentsImpl::GetFrameTree() { |
(...skipping 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4246 node->render_manager()->ResumeResponseDeferredAtStart(); | 4256 node->render_manager()->ResumeResponseDeferredAtStart(); |
4247 } | 4257 } |
4248 | 4258 |
4249 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4259 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4250 force_disable_overscroll_content_ = force_disable; | 4260 force_disable_overscroll_content_ = force_disable; |
4251 if (view_) | 4261 if (view_) |
4252 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4262 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4253 } | 4263 } |
4254 | 4264 |
4255 } // namespace content | 4265 } // namespace content |
OLD | NEW |